timescale / tsbs

Time Series Benchmark Suite, a tool for comparing and evaluating databases for time series data
MIT License
1.29k stars 300 forks source link

result stats: Enable persisting ingestion/query benchmark results in a common format across targets #147

Closed filipecosta90 closed 3 years ago

filipecosta90 commented 3 years ago

This PR kicks off the discussion about persisting ingestion/querying benchmark result stats in a common format. We've added the samples to full_cycle_minitest.

To do so, we've added --results-file to both loader and query runner tools. If no --result-file is specified then no summary result JSON is stored. Bellow you can find the sample output jsons for both loading and querying after running PASSWORD="password" ./scripts/full_cycle_minitest/full_cycle_minitest_timescaledb.sh with TimeScaleDB locally available on default ports.

Ingestion result sample json output

{
 "ResultFormatVersion": "0.1",
 "RunnerConfig": {
  "db-name": "benchmark",
  "batch-sze": 10000,
  "workers": 1,
  "limit": 0,
  "do-load": true,
  "do-create-db": true,
  "do-abort-on-exist": false,
  "reporting-period": 10000000000,
  "hash-workers": false,
  "no-flow-control": false,
  "channel-capacity": 0,
  "insert-intervals": "",
  "results-file": "timescaledb_load_results.json",
  "file": "/tmp/bulk_data/timescaledb_data",
  "seed": 0
 },
 "StartTime": 1620126088,
 "EndTime": 1620126090,
 "DurationMillis": 1312,
 "Totals": {
  "metricRate": 658166.850104776,
  "rowRate": 65816.6850104776
 }
}

query result sample json output

{
 "ResultFormatVersion": "0.1",
 "RunnerConfig": {
  "DBName": "benchmark",
  "Limit": 1000,
  "LimitRPS": 0,
  "MemProfile": "",
  "HDRLatenciesFile": "0rps_timescaledb_query_high-cpu-1.hdr",
  "Workers": 1,
  "PrintResponses": false,
  "Debug": 0,
  "FileName": "/tmp/bulk_data/timescaledb_query_high-cpu-1",
  "BurnIn": 0,
  "PrintInterval": 100,
  "PrewarmQueries": false,
  "ResultsFile": "timescaledb_query_high-cpu-1_results.json"
 },
 "StartTime": 1620126095,
 "EndTime": 1620126100,
 "DurationMillis": 4361,
 "Totals": {
  "burnIn": 0,
  "limit": 1000,
  "overallQuantiles": {
   "TimescaleDB CPU over threshold, 1 host(s)": {
    "q0": 0,
    "q100": 16.571,
    "q50": 4.039,
    "q95": 7.625,
    "q99": 9.272,
    "q999": 12.065
   },
   "allqueries": {
    "q0": 0,
    "q100": 16.571,
    "q50": 4.039,
    "q95": 7.625,
    "q99": 9.272,
    "q999": 12.065
   }
  },
  "overallQueryRates": {
   "TimescaleDB CPU over threshold, 1 host(s)": 229.3165254507947,
   "allqueries": 229.3165254507947
  },
  "prewarmQueries": false
 }
}
codecov-io commented 3 years ago

Codecov Report

Merging #147 (3006d29) into master (123f6aa) will decrease coverage by 0.26%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
- Coverage   65.40%   65.14%   -0.27%     
==========================================
  Files         145      145              
  Lines        5952     5976      +24     
==========================================
  Hits         3893     3893              
- Misses       1946     1970      +24     
  Partials      113      113              
Impacted Files Coverage Δ
load/loader.go 42.95% <0.00%> (-8.25%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 123f6aa...3006d29. Read the comment docs.

codecov-commenter commented 3 years ago

Codecov Report

Merging #147 (e1b0c7c) into master (a045665) will decrease coverage by 0.87%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
- Coverage   65.25%   64.37%   -0.88%     
==========================================
  Files         145      145              
  Lines        5966     6047      +81     
==========================================
  Hits         3893     3893              
- Misses       1960     2040      +80     
- Partials      113      114       +1     
Impacted Files Coverage Δ
load/loader.go 42.95% <0.00%> (-8.25%) :arrow_down:
pkg/query/benchmarker.go 61.00% <0.00%> (-12.50%) :arrow_down:
pkg/query/stat_processor.go 7.03% <0.00%> (-3.20%) :arrow_down:
pkg/query/stats.go 100.00% <0.00%> (ø)
pkg/targets/timescaledb/file_data_source.go 77.27% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a045665...e1b0c7c. Read the comment docs.

filipecosta90 commented 3 years ago

@jonatas @antekresic I believe all comments are addressed on the latest commit. Can you guys check it?