enhancementgood first issuehelp wanted
Description
Good morning all I've read as much as I could the doc and list of issues on github but could nt find a reply regarding this question. If I understand right this benchmark library offers nice way to register and benchmark different functions. But I did nt find a way for the library to :
- compare the timing (real, cpu, ...) with given threshold values
- reports which benchmark passed and which one failed if the time is higher than the threshold I have tested this following solution but there should be better :
- run the benchmark and output to json
- use for example the jq command line tool in order to test that each benched functions are within the desired threshold (benchresults.json contains the json example as given in the main .md doc) :
jq -e '.benchmarks[] | select(.name == "BM_SetInsert/1024/1").real_time < 30000' ~/tmp/benchresults.json
This is working but I m wondering if these tests should be better done inside the library. For instance, the user could provide via the commandline a "threshold" file (--treshold_file or whatever) giving the thresholds (time limits) for each benched functions : for example, in csv format : "BM_SetInsert/1024/1", 30000 "BM_SetInsert/1024/8", 33000 "BM_SetInsert/1024/10", 32000
RFC time. Cheers W.