summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@mit.edu>2011-08-09 10:06:02 -0400
committerAndy Lutomirski <luto@mit.edu>2011-08-09 10:06:02 -0400
commit2c1cd089cf4bc19984e031f645e34b5c4f321061 (patch)
treeefb78301c9e7abbe2325c76be2fc9a510cffb476
parentb6e8c1434ee078d244afe95a48845e72ffa938aa (diff)
downloadmisc-tests-2c1cd089cf4bc19984e031f645e34b5c4f321061.tar.gz
Fix context-switch-latency to show time per switch.
-rw-r--r--context_switch_latency.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/context_switch_latency.c b/context_switch_latency.c
index 522ba5b..db82805 100644
--- a/context_switch_latency.c
+++ b/context_switch_latency.c
@@ -109,8 +109,8 @@ int main(int argc, char **argv)
ns = 1000000000ULL * (end.tv_sec - start.tv_sec) + (end.tv_nsec - start.tv_nsec);
- printf("%llu iters at %.1f ns/iter\n",
- (unsigned long long)iters, (double)ns / iters);
+ printf("%llu iters at %.1f ns/switch\n",
+ (unsigned long long)iters, (double)ns / (2*iters));
pthread_join(thread, 0);