Skip to content

Instantly share code, notes, and snippets.

@ssvb
Created June 5, 2015 16:13
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/e0ff15b1b3e509bf1b5c to your computer and use it in GitHub Desktop.
Save ssvb/e0ff15b1b3e509bf1b5c 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 A10 (ARM Cortex-A8 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% | 80% | 95%
0.012% | 80% | 95%
0.014% | 85% | 95%
0.017% | 90% | 90%
0.021% | 90% | 95%
0.025% | 90% | 95%
0.030% | 95% | 100%
0.036% | 100% | 100%
0.043% | 95% | 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%
0.185% | 100% | 100%
0.222% | 100% | 100%
0.266% | 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.009% | 70% | 95%
0.011% | 80% | 95%
0.014% | 75% | 85%
0.017% | 80% | 95%
0.020% | 80% | 95%
0.025% | 95% | 100%
0.029% | 100% | 100%
0.036% | 100% | 100%
0.042% | 100% | 100%
0.051% | 100% | 100%
0.060% | 100% | 100%
0.073% | 100% | 100%
0.088% | 100% | 100%
0.107% | 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.019% | 85% | 95%
0.038% | 95% | 100%
0.056% | 95% | 95%
0.075% | 100% | 100%
0.094% | 95% | 100%
0.113% | 100% | 100%
0.150% | 100% | 100%
0.169% | 100% | 100%
0.207% | 100% | 100%
0.263% | 100% | 100%
0.319% | 100% | 100%
0.376% | 100% | 100%
0.451% | 100% | 100%
0.545% | 100% | 100%
0.658% | 100% | 100%
0.789% | 100% | 100%
0.939% | 100% | 100%
1.127% | 100% | 100%
1.371% | 100% | 100%
=== Allwinner A10 (ARM Cortex-A8 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.025% | 30% | 30%
0.050% | 50% | 50%
0.076% | 45% | 45%
0.101% | 40% | 40%
0.126% | 75% | 75%
0.151% | 60% | 60%
0.176% | 60% | 55%
0.201% | 55% | 55%
0.252% | 70% | 70%
0.302% | 65% | 65%
0.378% | 45% | 45%
0.453% | 60% | 65%
0.529% | 65% | 65%
0.654% | 95% | 95%
0.780% | 65% | 65%
0.931% | 65% | 65%
1.133% | 90% | 90%
1.359% | 100% | 100%
1.636% | 100% | 100%
1.963% | 85% | 85%
2.366% | 90% | 90%
2.844% | 100% | 100%
3.398% | 100% | 100%
4.078% | 95% | 95%
4.908% | 100% | 100%
5.890% | 95% | 95%
7.073% | 100% | 100%
8.482% | 95% | 95%
10.194% | 100% | 100%
12.233% | 100% | 100%
14.674% | 100% | 100%
17.619% | 100% | 100%
21.143% | 100% | 100%
25.396% | 100% | 100%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment