Skip to content

Instantly share code, notes, and snippets.

@ssvb
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssvb/958f15d6136082b9b2bd to your computer and use it in GitHub Desktop.
Save ssvb/958f15d6136082b9b2bd to your computer and use it in GitHub Desktop.
https://gist.github.com/ssvb/56da061451216a37080f
# This program runs a set of tests, which are repeatedly doing
# memcpy over N bytes sized memory buffer. Each individual
# test is calibrated to run a sufficient number of iterations
# to make its duration close to 300 ms.
# For each line in the report below, tests are run 20
# times normally and 20 times slightly slower than normal
# (the difference is shown in the first column). The timings
# of these runs are also measured using gettimeofday(...)
# and clock_gettime(CLOCK_PROCESS_CPUTIME_ID, ...) functions
# to see whether it is possible to reliably distinguish
# between the slower runs and the normal runs. The percentage
# of successful identifications is shown in the second and
# third columns (100% means that we could perfectly distinguish
# between normal and slower runs in all 20 attempts).
=== NVIDIA Tegra K1 (quad ARM Cortex-A15 2.2GHz), idle Android ===
test_duration = 300 ms (the first command line argument)
working_set_size = 0 bytes (the second command line argument)
difference | detected by gettime | detected by cputime
-----------+---------------------+--------------------
0.010% | 65% | 65%
0.012% | 55% | 80%
0.014% | 45% | 60%
0.017% | 55% | 85%
0.021% | 45% | 80%
0.025% | 75% | 100%
0.030% | 70% | 100%
0.036% | 70% | 85%
0.043% | 85% | 95%
0.052% | 80% | 95%
0.062% | 80% | 100%
0.074% | 90% | 100%
0.089% | 90% | 100%
0.107% | 95% | 100%
0.128% | 85% | 100%
0.154% | 90% | 100%
0.185% | 100% | 100%
0.222% | 85% | 100%
0.266% | 100% | 100%
0.319% | 95% | 95%
0.383% | 90% | 100%
0.460% | 95% | 95%
0.552% | 95% | 100%
0.662% | 100% | 100%
0.795% | 100% | 100%
0.954% | 90% | 100%
1.145% | 95% | 100%
1.374% | 95% | 100%
1.648% | 100% | 100%
1.978% | 95% | 100%
2.374% | 100% | 100%
2.849% | 100% | 100%
3.418% | 95% | 100%
4.102% | 100% | 100%
4.922% | 100% | 100%
5.907% | 100% | 100%
7.088% | 100% | 100%
8.506% | 100% | 100%
10.207% | 100% | 100%
------------------------------------------------------
test_duration = 300 ms (the first command line argument)
working_set_size = 8000 bytes (the second command line argument)
difference | detected by gettime | detected by cputime
-----------+---------------------+--------------------
0.010% | 65% | 75%
0.012% | 60% | 75%
0.014% | 55% | 75%
0.017% | 55% | 80%
0.021% | 60% | 100%
0.025% | 55% | 95%
0.030% | 65% | 100%
0.036% | 75% | 100%
0.043% | 50% | 85%
0.052% | 75% | 100%
0.062% | 85% | 100%
0.074% | 85% | 100%
0.089% | 85% | 100%
0.107% | 90% | 100%
0.128% | 90% | 95%
0.154% | 95% | 100%
0.185% | 85% | 100%
0.222% | 100% | 100%
0.266% | 95% | 100%
0.319% | 95% | 100%
0.383% | 95% | 100%
0.460% | 100% | 100%
0.552% | 100% | 100%
0.662% | 95% | 100%
0.795% | 95% | 100%
0.954% | 95% | 100%
1.145% | 95% | 100%
1.374% | 100% | 100%
1.648% | 90% | 100%
1.978% | 95% | 100%
2.374% | 95% | 100%
2.848% | 100% | 100%
3.418% | 100% | 100%
4.102% | 85% | 100%
4.922% | 100% | 100%
5.907% | 100% | 100%
------------------------------------------------------
test_duration = 300 ms (the first command line argument)
working_set_size = 100000 bytes (the second command line argument)
difference | detected by gettime | detected by cputime
-----------+---------------------+--------------------
0.009% | 60% | 50%
0.013% | 55% | 75%
0.017% | 50% | 60%
0.021% | 45% | 70%
0.030% | 70% | 80%
0.034% | 70% | 90%
0.043% | 70% | 95%
0.051% | 85% | 100%
0.060% | 75% | 95%
0.072% | 100% | 100%
0.085% | 75% | 100%
0.106% | 90% | 95%
0.128% | 90% | 100%
0.153% | 90% | 95%
0.183% | 90% | 100%
0.221% | 100% | 100%
0.264% | 95% | 100%
0.319% | 95% | 100%
0.383% | 95% | 100%
0.459% | 95% | 100%
0.548% | 95% | 100%
0.659% | 95% | 100%
0.795% | 95% | 100%
0.952% | 95% | 100%
1.144% | 95% | 100%
1.373% | 95% | 100%
1.645% | 95% | 100%
1.977% | 100% | 100%
2.372% | 90% | 100%
2.848% | 95% | 100%
3.418% | 95% | 100%
4.098% | 100% | 100%
4.918% | 100% | 100%
5.905% | 100% | 100%
7.086% | 100% | 100%
8.502% | 100% | 100%
10.207% | 100% | 100%
12.247% | 100% | 100%
14.696% | 100% | 100%
17.633% | 100% | 100%
21.161% | 100% | 100%
25.395% | 100% | 100%
30.475% | 100% | 100%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment