GehaFearless commented on code in PR #1373:
URL: 
https://github.com/apache/incubator-pegasus/pull/1373#discussion_r1121066156


##########
run.sh:
##########
@@ -1399,6 +1399,8 @@ function usage_bench()
     echo "                             fillrandom_pegasus       --pegasus 
write N random values with random keys list"
     echo "                             readrandom_pegasus       --pegasus read 
N times with random keys list"
     echo "                             deleterandom_pegasus     --pegasus 
delete N entries with random keys list"
+    echo "                             multisetrandom_pegasus   --pegasus 
write (N/100)*100 random values with N/100 random keys list"

Review Comment:
   write 100 values with the same hashkey,so N should be a multiple of 100.
   
   `for (int i = 0; i < FLAGS_benchmark_num / 100; i++) `



##########
src/test/bench_test/benchmark.cpp:
##########
@@ -152,6 +154,48 @@ void benchmark::write_random(thread_arg *thread)
     thread->stats.add_bytes(bytes);
 }
 
+void benchmark::multi_set_random(thread_arg *thread)
+{
+    // do write operation num times

Review Comment:
   `--num <num>               number of key/value pairs, default is 10000"`



##########
src/test/bench_test/benchmark.cpp:
##########
@@ -191,6 +235,58 @@ void benchmark::read_random(thread_arg *thread)
     thread->stats.add_message(msg);
 }
 
+void benchmark::multi_get_random(thread_arg *thread)
+{
+    uint64_t bytes = 0;
+    uint64_t found = 0;
+    int max_fetch_count = 100;
+    int max_fetch_size = 1000000;
+
+    for (int i = 0; i < FLAGS_benchmark_num / 100; i++) {
+
+        // generate hash key
+        std::string hashkey, sort_key, value;
+        hashkey = generate_string(FLAGS_hashkey_size);
+        std::map<std::string, std::string> kvs;
+        std::set<std::string> sortkeys;
+
+        // generate sort key
+        // generate value for random to keep in peace with write
+        for (int j = 0; j < 100; j++) {
+            sortkeys.insert(generate_string(FLAGS_sortkey_size));
+            value = generate_string(FLAGS_value_size);

Review Comment:
   Cos `generate_string` should be ordered make data.
   
   Be like `generate_kv_pair` for `read_random`.



-- 
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]

Reply via email to