foyer-rs / foyer

Hybrid in-memory and disk cache in Rust
https://foyer.rs
Apache License 2.0
291 stars 20 forks source link

refactor: refine device build #745

Closed MrCroxx closed 4 weeks ago

MrCroxx commented 1 month ago

What's changed and what's your intention?

Please explain IN DETAIL what the changes are in this PR and why they are needed. :D

Make sure can use XxxDeviceOptions directly with with_device_options(). The old builder looks so wired.

Checklist

Related issues or PRs (optional)

327

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 87.67123% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
foyer-bench/src/main.rs 50.00% 3 Missing :warning:
foyer-storage/src/device/mod.rs 57.14% 3 Missing :warning:
foyer-storage/src/store.rs 81.81% 2 Missing :warning:
foyer-storage/src/device/monitor.rs 80.00% 1 Missing :warning:
Files with missing lines Coverage Δ
foyer-storage/src/device/direct_file.rs 85.16% <100.00%> (+0.24%) :arrow_up:
foyer-storage/src/device/direct_fs.rs 88.06% <100.00%> (+0.20%) :arrow_up:
foyer-storage/src/large/generic.rs 89.83% <100.00%> (-0.06%) :arrow_down:
foyer-storage/src/large/scanner.rs 75.42% <100.00%> (-0.28%) :arrow_down:
foyer-storage/src/large/tombstone.rs 96.55% <100.00%> (ø)
foyer-storage/src/small/generic.rs 74.61% <100.00%> (-0.27%) :arrow_down:
foyer/src/hybrid/builder.rs 95.15% <100.00%> (ø)
foyer/src/hybrid/cache.rs 82.66% <100.00%> (-0.11%) :arrow_down:
foyer-storage/src/device/monitor.rs 81.00% <80.00%> (+2.35%) :arrow_up:
foyer-storage/src/store.rs 86.81% <81.81%> (ø)
... and 2 more

... and 1 file with indirect coverage changes