danielealbano / cachegrand

cachegrand - a modern data ingestion, processing and serving platform built for today's hardware
BSD 3-Clause "New" or "Revised" License
975 stars 34 forks source link

Report clock resolution during the bootstrap #174

Closed danielealbano closed 2 years ago

danielealbano commented 2 years ago

This PR introduces two new functions to report the clock resolution for CLOCK_MONOTONIC_COARSE and CLOCK_REALTIME_COARSE, which are used for the storage db entries expirations, and add a log line to report the resolution at the boostrap.

Tests are also updated within the PR to use these functions instead of fetching the resolution via clock_getres.

codecov[bot] commented 2 years ago

Codecov Report

Merging #174 (a567ff6) into main (09ed767) will increase coverage by 0.04%. The diff coverage is 88.89%.

@@            Coverage Diff             @@
##             main     #174      +/-   ##
==========================================
+ Coverage   78.70%   78.75%   +0.04%     
==========================================
  Files         103      104       +1     
  Lines        6574     6583       +9     
==========================================
+ Hits         5174     5184      +10     
+ Misses       1400     1399       -1     
Impacted Files Coverage Δ
src/clock.h 80.00% <ø> (ø)
.../data_structures/hashtable/mcmp/hashtable_op_set.c 100.00% <ø> (ø)
src/program.c 26.35% <0.00%> (-0.10%) :arrow_down:
src/clock.c 100.00% <100.00%> (ø)
src/network/network.c 80.00% <0.00%> (+1.48%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.