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

Make statProcessor an interface and create tests for BencRunner #74

Closed atanasovskib closed 5 years ago

atanasovskib commented 5 years ago

The statProcessor responsible for gathering statistics when executing queries was built as a struct. This commit will change it to an interface to make the BenchmarkRunner code more easier to test. This commit also adds some unit tests for the benchmark runner that check if proper argument checks are done, and if proper init happens when the Run method is called

codecov-io commented 5 years ago

Codecov Report

Merging #74 into master will increase coverage by 1.13%. The diff coverage is 51.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
+ Coverage    64.9%   66.03%   +1.13%     
==========================================
  Files          77       77              
  Lines        3810     3819       +9     
==========================================
+ Hits         2473     2522      +49     
+ Misses       1309     1266      -43     
- Partials       28       31       +3
Impacted Files Coverage Δ
query/benchmarker.go 87.17% <100%> (+56.51%) :arrow_up:
query/stat_processor.go 21.73% <29.16%> (+4.27%) :arrow_up:

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 f7b8830...d684bda. Read the comment docs.