| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .. | ||
| MultiBen.mqh | ||
| README.md | ||
| sql_init.sql | ||
| sql_insert.sql | ||
Utils/MBen
Benchmarking helper for timing multiple code blocks/operations and persisting the results to a local SQLite database for later comparison.
Main features
- Accumulate timing samples per operation/dataset in memory (
CMultiBenchmark::Add). - Flush all accumulated samples to a local SQLite database, creating the table if needed (
CMultiBenchmark::Finish). - Parse a previously generated
.logfile (with a[MultiBen&tagging convention) and flush its results to the database as well (CMultiBenchmark::ParseLogFileTodayFlushDb).
Basic usage
CMultiBenchmark::Add("parse_json", "dataset_1000", 1, elapsed_microseconds);
// ... repeat Add() for each iteration/operation ...
CMultiBenchmark::Finish("benchmarks.sqlite", TimeToString(TimeLocal(), TIME_DATE), "MyLib");
Only the most representative methods are shown here.