ostafen / smart

String Matching Algorithms Research Tool
https://smart-tool.github.io/smart/
GNU General Public License v3.0
4 stars 2 forks source link

Algostats #94

Closed nishihatapalmer closed 3 months ago

nishihatapalmer commented 3 months ago

Algorithm Runtime Statistics

This PR adds the capability to instrument algorithms with code that tracks the runtime operation of the algorithms, as opposed to their performance. It gathers the following stats by default:

It also provides up to 6 algorithm-defined custom values that can be tracked and named. All measurements are analysed to provide median, mean, standard deviation, minimum and maximum values for each run, and the individual measurements are also output.

Design

Any algorithm that is instrumented to gather runtime statistics must have a filename prefixed by stat_. These versions will be run when smart is run on the algorithms using the flag -stats algo.

A detailed description of how to operate and instrument the algorithms is in the file AlgorithmMeasurements.md.

Additional

Some extra features are also included here. These are: 1) Statistics output on the command line is now in fixed length columns to make reading easier. 2) All patterns used in an experiment are output to a CSV file that contains the length, measurement number, ASCII-printable version of the pattern (where possible), and a hex version of the pattern bytes.

nishihatapalmer commented 3 months ago

to wrong branch.