Skip to content

Commit

Permalink
Thread local without num limit
Browse files Browse the repository at this point in the history
  • Loading branch information
chenBright committed Jul 2, 2023
1 parent fc79aaf commit dc5a8ce
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions test/thread_key_unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "butil/thread_key.h"
#include "butil/fast_rand.h"
#include "bthread/bthread.h"
#include "butil/gperftools_profiler.h"

namespace butil {
namespace {
Expand All @@ -41,8 +40,6 @@ namespace {

bool g_started = false;
bool g_stopped = false;
int g_thread_key_prof_name_counter = 0;
int g_thread_local_prof_name_counter = 0;

struct ThreadKeyInfo {
uint32_t id;
Expand Down Expand Up @@ -352,12 +349,8 @@ void ThreadKeyPerfTest(int thread_num, bool test_pthread_key) {
usleep(1000);
}
g_started = true;
char prof_name[32];
snprintf(prof_name, sizeof(prof_name), "thread_key_%d.prof", ++g_thread_key_prof_name_counter);
ProfilerStart(prof_name);
int64_t run_ms = 5 * 1000;
usleep(run_ms * 1000);
ProfilerStop();
g_stopped = true;
int64_t wait_time = 0;
int64_t count = 0;
Expand Down Expand Up @@ -433,12 +426,8 @@ void ThreadLocalPerfTest(int thread_num) {
usleep(1000);
}
g_started = true;
char prof_name[32];
snprintf(prof_name, sizeof(prof_name), "thread_local_%d.prof", ++g_thread_local_prof_name_counter);
ProfilerStart(prof_name);
int64_t run_ms = 5 * 1000;
usleep(run_ms * 1000);
ProfilerStop();
g_stopped = true;
int64_t wait_time = 0;
int64_t count = 0;
Expand Down

0 comments on commit dc5a8ce

Please sign in to comment.