Skip to content

Commit

Permalink
update batch size
Browse files Browse the repository at this point in the history
  • Loading branch information
baotiao committed Nov 30, 2017
1 parent 0c9ca69 commit 18eadbb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion floyd/example/simple/t1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ int main(int argc, char * argv[])
if (argc > 2) {
val_size = atoi(argv[2]);
}
if (argc > 3) {
item_num = atoi(argv[3]);
}

printf("multi threads test to get performance thread num %d key size %d item number %d\n", thread_num, val_size, item_num);

Expand Down Expand Up @@ -113,7 +116,7 @@ int main(int argc, char * argv[])
pthread_join(pid[i], NULL);
}
ed = NowMicros();
printf("write 100000 cost time microsecond(us) %ld, qps %llu\n", ed - st, item_num * thread_num * 1000000LL / (ed - st));
printf("write %d datas cost time microsecond(us) %ld, qps %llu\n", item_num * thread_num, ed - st, item_num * thread_num * 1000000LL / (ed - st));

getchar();
delete f2;
Expand Down
4 changes: 2 additions & 2 deletions floyd/src/floyd_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Options::Options()
check_leader_us(6000000),
heartbeat_us(3000000),
append_entries_size_once(10240000),
append_entries_count_once(10240),
append_entries_count_once(102400),
single_mode(false) {
}

Expand All @@ -101,7 +101,7 @@ Options::Options(const std::string& cluster_string,
check_leader_us(6000000),
heartbeat_us(3000000),
append_entries_size_once(10240000),
append_entries_count_once(10240),
append_entries_count_once(102400),
single_mode(false) {
std::srand(slash::NowMicros());
// the default check_leader is [3s, 5s)
Expand Down

0 comments on commit 18eadbb

Please sign in to comment.