Skip to content

Instantly share code, notes, and snippets.

@ssvb
Created June 5, 2015 14:46
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/690fb4f11766f7e4d6bf to your computer and use it in GitHub Desktop.
Save ssvb/690fb4f11766f7e4d6bf 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).
=== Allwinner A20 (dual ARM Cortex-A7 1GHz), idle Linux ===
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% | 90% | 95%
0.012% | 95% | 95%
0.014% | 95% | 95%
0.017% | 95% | 95%
0.021% | 90% | 95%
0.025% | 90% | 95%
0.030% | 100% | 100%
0.036% | 100% | 100%
0.043% | 100% | 100%
0.052% | 100% | 100%
0.062% | 100% | 100%
0.074% | 100% | 100%
0.089% | 100% | 100%
0.107% | 100% | 100%
0.128% | 100% | 100%
0.154% | 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% | 70% | 70%
0.011% | 70% | 75%
0.014% | 60% | 65%
0.017% | 75% | 70%
0.020% | 70% | 70%
0.025% | 70% | 70%
0.030% | 55% | 55%
0.035% | 35% | 35%
0.043% | 75% | 75%
0.051% | 55% | 55%
0.061% | 55% | 55%
0.073% | 45% | 45%
0.089% | 60% | 60%
0.107% | 80% | 80%
0.128% | 45% | 45%
0.153% | 50% | 50%
0.185% | 65% | 65%
0.221% | 75% | 75%
0.266% | 85% | 85%
0.319% | 45% | 45%
0.383% | 50% | 50%
0.459% | 85% | 85%
0.552% | 65% | 65%
0.662% | 70% | 70%
0.795% | 60% | 55%
0.954% | 80% | 80%
1.144% | 75% | 75%
1.373% | 90% | 90%
1.648% | 75% | 75%
1.978% | 95% | 95%
2.373% | 85% | 85%
2.848% | 100% | 100%
3.418% | 100% | 100%
4.101% | 100% | 100%
4.921% | 95% | 95%
5.907% | 100% | 100%
7.088% | 100% | 100%
8.505% | 100% | 100%
10.207% | 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.017% | 65% | 80%
0.034% | 75% | 75%
0.052% | 90% | 90%
0.069% | 90% | 95%
0.086% | 95% | 95%
0.103% | 85% | 90%
0.120% | 100% | 100%
0.137% | 95% | 100%
0.172% | 100% | 100%
0.206% | 95% | 95%
0.258% | 100% | 100%
0.309% | 100% | 100%
0.378% | 100% | 100%
0.447% | 100% | 100%
0.550% | 100% | 100%
0.653% | 100% | 100%
0.791% | 100% | 100%
0.945% | 100% | 100%
1.134% | 100% | 100%
1.358% | 100% | 100%
=== Allwinner A20 (dual ARM Cortex-A7 1GHz), disturbed by flood ping ===
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.035% | 70% | 70%
0.070% | 60% | 60%
0.104% | 45% | 45%
0.139% | 55% | 50%
0.174% | 65% | 65%
0.209% | 55% | 50%
0.243% | 55% | 55%
0.313% | 60% | 60%
0.382% | 60% | 60%
0.452% | 75% | 75%
0.522% | 55% | 55%
0.661% | 70% | 70%
0.765% | 90% | 90%
0.939% | 70% | 70%
1.113% | 45% | 45%
1.356% | 65% | 65%
1.634% | 75% | 75%
1.947% | 90% | 90%
2.364% | 75% | 75%
2.816% | 60% | 60%
3.408% | 95% | 95%
4.068% | 85% | 85%
4.903% | 100% | 100%
5.876% | 95% | 95%
7.058% | 90% | 90%
8.484% | 95% | 95%
10.188% | 100% | 100%
12.239% | 100% | 100%
14.673% | 100% | 100%
17.629% | 100% | 100%
21.140% | 100% | 100%
25.382% | 100% | 100%
30.459% | 100% | 100%
36.544% | 100% | 100%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment