summaryrefslogtreecommitdiff
path: root/perf/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'perf/cpp')
-rw-r--r--perf/cpp/local_thr.cpp2
-rw-r--r--perf/cpp/remote_lat.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/perf/cpp/local_thr.cpp b/perf/cpp/local_thr.cpp
index ca81ba9..31fcd16 100644
--- a/perf/cpp/local_thr.cpp
+++ b/perf/cpp/local_thr.cpp
@@ -49,7 +49,7 @@ int main (int argc, char *argv [])
int rc = gettimeofday (&start, NULL);
assert (rc == 0);
- for (int i = 0; i != message_count - 1; i++) {
+ for (int i = 1; i != message_count; i++) {
s.recv (&msg);
assert (msg.size () == message_size);
}
diff --git a/perf/cpp/remote_lat.cpp b/perf/cpp/remote_lat.cpp
index c3ded10..a88d53d 100644
--- a/perf/cpp/remote_lat.cpp
+++ b/perf/cpp/remote_lat.cpp
@@ -58,13 +58,13 @@ int main (int argc, char *argv [])
end.tv_sec -= start.tv_sec;
start.tv_sec = 0;
- double usec_elapsed = (end.tv_sec * 1000000 + end.tv_usec) -
+ double elapsed = (end.tv_sec * 1000000 + end.tv_usec) -
(start.tv_sec * 1000000 + start.tv_usec);
- double latency = usec_elapsed / (roundtrip_count * 2);
+ double latency = elapsed / (roundtrip_count * 2);
printf ("message size: %d [B]\n", (int) message_size);
printf ("roundtrip count: %d\n", (int) roundtrip_count);
- printf ("average latency: %.3f [us]\n", (double) latency);
+ printf ("mean latency: %.3f [us]\n", (double) latency);
return 0;
}