tikv / raft-engine

A persistent storage engine for Multi-Raft log
Apache License 2.0
565 stars 88 forks source link

refactor FilePipeLog and improve latency metering #153

Closed tabokie closed 3 years ago

tabokie commented 3 years ago

Improve latency metering, in specific, add duration metrics for writer wait, log rotate, log allocate. Add counter metrics for entry count. Refactor FilePipeLog into a separate module, and move recovery logic into builder.

Fix bugs:

codecov[bot] commented 3 years ago

Codecov Report

Merging #153 (0a12d02) into master (ce65f11) will increase coverage by 0.14%. The diff coverage is 97.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #153      +/-   ##
==========================================
+ Coverage   96.73%   96.87%   +0.14%     
==========================================
  Files          23       25       +2     
  Lines        6086     6176      +90     
==========================================
+ Hits         5887     5983      +96     
+ Misses        199      193       -6     
Impacted Files Coverage Δ
src/file_pipe_log/log_file.rs 92.15% <ø> (ø)
src/pipe_log.rs 93.10% <ø> (ø)
src/file_pipe_log/format.rs 90.52% <90.52%> (ø)
src/file_pipe_log/builder.rs 96.04% <96.04%> (ø)
src/file_pipe_log/pipe_log.rs 97.29% <97.29%> (ø)
src/memtable.rs 99.44% <99.03%> (-0.06%) :arrow_down:
src/engine.rs 94.83% <100.00%> (+0.07%) :arrow_up:
src/file_pipe_log/reader.rs 88.00% <100.00%> (ø)
src/lib.rs 100.00% <100.00%> (ø)
src/metrics.rs 97.36% <100.00%> (+0.70%) :arrow_up:
... and 4 more

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 ce65f11...0a12d02. Read the comment docs.