GehaFearless commented on code in PR #1373:
URL:
https://github.com/apache/incubator-pegasus/pull/1373#discussion_r1121730582
##########
src/test/bench_test/benchmark.cpp:
##########
@@ -152,6 +155,57 @@ void benchmark::write_random(thread_arg *thread)
thread->stats.add_bytes(bytes);
}
+void benchmark::multi_set_random(thread_arg *thread)
+{
+ if (FLAGS_benchmark_num % FLAGS_multi_count != 0) {
+ fmt::print(stderr,
+ "num {} should be a multiple of multi_count({}).\n",
+ FLAGS_benchmark_num,
+ FLAGS_multi_count);
+ dsn_exit(1);
+ }
+
+ // do write operation num times
+ uint64_t bytes = 0;
+
+ for (int i = 0; i < FLAGS_benchmark_num / FLAGS_multi_count; i++) {
+ // generate hash key
+ std::string hash_key, sort_key, value;
+ hash_key = generate_string(FLAGS_hashkey_size);
Review Comment:
It will make trouble.The argument list is built from right to left.So I need
the 2 temporary variable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]