{"action":"created","issue":{"url":"https://api.github.com/repos/ibmcb/cbtool/issues/58","labels_url":"https://api.github.com/repos/ibmcb/cbtool/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/ibmcb/cbtool/issues/58/comments","events_url":"https://api.github.com/repos/ibmcb/cbtool/issues/58/events","html_url":"https://github.com/ibmcb/cbtool/issues/58","id":54629948,"number":58,"title":"cassandra_ycsb AI result reporting is incorrect","user":{"login":"cpschult","id":9932485,"avatar_url":"https://avatars.githubusercontent.com/u/9932485?v=3","gravatar_id":"","url":"https://api.github.com/users/cpschult","html_url":"https://github.com/cpschult","followers_url":"https://api.github.com/users/cpschult/followers","following_url":"https://api.github.com/users/cpschult/following{/other_user}","gists_url":"https://api.github.com/users/cpschult/gists{/gist_id}","starred_url":"https://api.github.com/users/cpschult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpschult/subscriptions","organizations_url":"https://api.github.com/users/cpschult/orgs","repos_url":"https://api.github.com/users/cpschult/repos","events_url":"https://api.github.com/users/cpschult/events{/privacy}","received_events_url":"https://api.github.com/users/cpschult/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-16T21:56:36Z","updated_at":"2015-02-10T18:31:04Z","closed_at":"2015-02-10T18:31:04Z","body":"It appears lazy_collection in scripts/cassandra_ycsb/cb_ycsb_common.sh may have a couple problems.\r\n\r\n1)  lazy_collection (the default collection mechanism) differs from eager_collection in that it uses different units for latency measurements.  I'm having trouble capturing the output from the YCSB run command to verify the measurement units but I assume they are the same as used in the generation phase ( which are microseconds for average measurements ).\r\n```\r\n...\r\n[OVERALL], RunTime(ms), 646267.0\r\n[OVERALL], Throughput(ops/sec), 1547.3480774973812\r\n[INSERT], Operations, 1000000\r\n**[INSERT], AverageLatency(us), 641.728206**\r\n[INSERT], MinLatency(us), 252\r\n[INSERT], MaxLatency(us), 129799\r\n[INSERT], 95thPercentileLatency(ms), 0\r\n[INSERT], 99thPercentileLatency(ms), 1\r\n[INSERT], Return=0, 1000000\r\n...\r\n```\r\n\r\nI think the fix is pretty simple.  Something like this:\r\n```\r\n$diff a/scripts/cassandra_ycsb/cb_ycsb_common.sh b/scripts/cassandra_ycsb/cb_ycsb_common.sh\r\n-    latency:$(expr $latency):ms \\\r\n+    latency:$(expr $latency):us \\\r\n```\r\n\r\n2)  But there appears to be another problem.  It looks like lazy_collection looks for READ and UPDATE measurements in the output file.  (this seems OK for YCSB! workload 'workloadd' ) As written lazy_collection only reports one of the values and doesn't provide any indication which value is returned.  Should it be written similar to eager_collection where it reports both read and update values back to cb orchestrator?\r\n\r\nI haven't tested the proposed changed below.  It seems there could be farther reaching consequences as 'latency' is no longer returned in the result set.  I don't know if that is a problem.\r\n\r\nsomething like:\r\n```\r\ndiff --git a/scripts/cassandra_ycsb/cb_ycsb_common.sh b/scripts/cassandra_ycsb/cb_ycsb_common.sh\r\nindex 00db685..46eeb5f 100755\r\n--- a/scripts/cassandra_ycsb/cb_ycsb_common.sh\r\n+++ b/scripts/cassandra_ycsb/cb_ycsb_common.sh\r\n \r\n\r\n@@ -170,20 +174,20 @@ function lazy_collection {\r\n         then\r\n             if [[ ${array[1]} == *AverageLatency* ]]\r\n             then\r\n-                latency=${array[2]}\r\n+                update_avg_latency=${array[2]}\r\n             fi\r\n         fi\r\n         if [[ ${array[0]} == *READ* ]]\r\n         then\r\n             if [[ ${array[1]} == *AverageLatency* ]]\r\n             then\r\n-                latency=${array[2]}\r\n+                read_avg_latency=${array[2]}\r\n             fi\r\n         fi\r\n     \r\n@@ -221,7 +225,8 @@ function lazy_collection {\r\n     load_profile:${LOAD_PROFILE}:name \\\r\n     load_duration:${LOAD_DURATION}:sec \\\r\n     throughput:$(expr $ops):tps \\\r\n-    latency:$(expr $latency):us \\\r\n+    update_avg_latency:$(expr $update_avg_latency):us \\\r\n+    read_avg_latency:$(expr $read_avg_latency):us \\\r\n     datagen_time:${datagentime}:sec \\\r\n     datagen_size:${datagensize}:records \\\r\n     ${SLA_RUNTIME_TARGETS}\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ibmcb/cbtool/issues/comments/73754860","html_url":"https://github.com/ibmcb/cbtool/issues/58#issuecomment-73754860","issue_url":"https://api.github.com/repos/ibmcb/cbtool/issues/58","id":73754860,"user":{"login":"maugustosilva","id":2022883,"avatar_url":"https://avatars.githubusercontent.com/u/2022883?v=3","gravatar_id":"","url":"https://api.github.com/users/maugustosilva","html_url":"https://github.com/maugustosilva","followers_url":"https://api.github.com/users/maugustosilva/followers","following_url":"https://api.github.com/users/maugustosilva/following{/other_user}","gists_url":"https://api.github.com/users/maugustosilva/gists{/gist_id}","starred_url":"https://api.github.com/users/maugustosilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maugustosilva/subscriptions","organizations_url":"https://api.github.com/users/maugustosilva/orgs","repos_url":"https://api.github.com/users/maugustosilva/repos","events_url":"https://api.github.com/users/maugustosilva/events{/privacy}","received_events_url":"https://api.github.com/users/maugustosilva/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T18:31:03Z","updated_at":"2015-02-10T18:31:03Z","body":"Fixed in commit b089cfd4bd883824636498058b096842c87f6ca6. Thanks Chris."}}