Tutorial 1: BenchMark¶
Command line¶
It is controlled via command benchmark with following options.
Optional:
- –bench-groups: test groups, grp1,grp2,... , default all, available groups: disk,event,math,memory,network
- –bench-cycles: count of measurement cycles, default 20
- –bench-out: output filename, default not generated
- –bench-gc: enable garbage collector, default False
Configuration¶
Default configuration
Extensions: BenchMark: package: hydratk.extensions.benchmark module: benchmark enabled: 1 groups: all cycles: 20 enable_gc: 0 outfile:
Sample report¶
Times are in milliseconds.
# printed report Group Test Mean Median Min Max Variance Std deviation 1st quartile 3rd quartile disk dir_mult 45.15 41.965 38.103 96.219 149.472 12.226 41.258 43.805 disk dir_tree 52.494 52.075 49.03 61.817 9.109 3.018 50.781 54.471 disk file_mult 34.784 34.345 33.205 42.048 3.54 1.881 33.825 35.52 disk file_single 15.618 11.653 9.712 93.372 318.984 17.86 10.989 12.5 event throughput 83.51 83.136 78.873 98.398 17.797 4.219 81.234 84.959 math factorial 47.877 47.669 44.906 53.662 3.856 1.964 46.907 49.428 math fibonacci 3.533 3.627 2.884 4.46 0.192 0.438 3.2 3.924 math floating_point 80.156 78.27 75.162 100.597 30.784 5.548 77.338 82.16 memory allocate_mult 487.221 473.02 454.073 542.996 1070.962 32.726 461.532 527.601 memory allocate_single 201.597 199.27 184.816 248.13 171.741 13.105 196.061 206.949 network request_mult 428.357 406.745 294.338 635.864 7478.301 86.477 369.633 478.689 network request_single 6.067 4.692 2.536 30.927 35.338 5.945 4.085 5.915 # report file Group,Test,Mean,Median,Min,Max,Variance,Std deviation,1st quartile,3rd quartile,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value,Value disk,dir_mult,45.15,41.965,38.103,96.219,149.472,12.226,41.258,43.805,40.047,42.058,38.103,44.379,41.184,42.436,46.787,43.231,41.331,96.219,41.919,41.721,39.349,55.546,40.393,43.01,41.53,42.012,41.487,40.251 disk,dir_tree,52.494,52.075,49.03,61.817,9.109,3.018,50.781,54.471,57.183,51.239,55.137,51.091,52.194,49.415,49.03,52.148,50.795,52.002,50.679,61.817,53.805,52.822,50.282,56.373,49.807,50.86,50.767,52.429 disk,file_mult,34.784,34.345,33.205,42.048,3.54,1.881,33.825,35.52,34.795,33.807,34.987,33.554,36.14,34.132,35.978,35.174,33.362,34.558,35.865,34.116,42.048,33.908,33.89,33.687,33.843,33.205,35.144,33.477 disk,file_single,15.618,11.653,9.712,93.372,318.984,17.86,10.989,12.5,93.372,12.025,11.09,11.213,10.976,12.908,12.165,10.968,9.712,10.922,11.842,11.001,12.836,11.794,11.041,13.684,11.512,10.636,11.932,10.728 event,throughput,83.51,83.136,78.873,98.398,17.797,4.219,81.234,84.959,82.649,85.02,81.566,88.326,81.371,84.899,83.624,80.994,79.027,82.196,80.192,84.045,82.454,98.398,81.097,78.873,87.421,83.862,84.375,79.805 math,factorial,47.877,47.669,44.906,53.662,3.856,1.964,46.907,49.428,45.684,51.021,46.987,47.776,47.729,47.61,48.007,47.058,50.048,46.589,47.771,47.085,45.979,53.662,46.701,46.827,47.239,44.906,49.764,49.091 math,fibonacci,3.533,3.627,2.884,4.46,0.192,0.438,3.2,3.924,2.894,2.995,3.117,4.46,3.233,3.818,3.486,4.161,3.331,3.755,3.79,3.964,3.614,3.091,2.884,4.052,3.168,3.326,3.884,3.641 math,floating_point,80.156,78.27,75.162,100.597,30.784,5.548,77.338,82.16,84.039,78.105,78.436,80.688,78.097,82.543,77.037,75.769,81.776,80.481,76.871,75.162,77.019,87.475,77.667,77.638,76.019,77.993,100.597,79.702 memory,allocate_mult,487.221,473.02,454.073,542.996,1070.962,32.726,461.532,527.601,515.885,457.656,542.996,456.995,461.271,479.551,458.984,461.306,462.376,461.758,454.073,514.527,539.317,474.364,471.676,540.407,541.283,471.025,514.414,464.556 memory,allocate_single,201.597,199.27,184.816,248.13,171.741,13.105,196.061,206.949,201.554,196.728,195.105,195.642,196.481,199.704,191.509,207.086,212.429,206.811,197.461,203.103,203.095,198.836,197.426,184.816,185.696,216.464,193.858,248.13 network,request_mult,428.357,406.745,294.338,635.864,7478.301,86.477,369.633,478.689,489.083,371.776,456.967,294.338,468.295,404.848,435.647,359.339,405.395,362.777,372.517,365.065,397.517,408.094,367.49,360.104,440.652,621.338,550.029,635.864 network,request_single,6.067,4.692,2.536,30.927,35.338,5.945,4.085,5.915,5.403,10.605,4.717,2.536,4.186,6.419,4.287,6.339,5.491,3.24,3.985,4.8,30.927,4.208,3.645,4.372,2.884,4.668,3.36,5.264