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

Algorithm runtime statistics #95

Closed nishihatapalmer closed 5 months ago

nishihatapalmer commented 5 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:

For each run, it computes the average jump obtained during search (text length / number of jumps), and the percent of text read.

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:

nishihatapalmer commented 5 months ago

Some sample algorithms have stats versions included, but will need to instrument quite a few of the remaining ones (and the other Q-gram sizes too).