Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: a more friendly dynamic_dispatch bench #332

Open
wants to merge 259 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
259 commits
Select commit Hold shift + click to select a range
24cccaf
feat: introduce read only file store (#9)
MrCroxx May 24, 2023
7a2467c
fix: add simple test for read only file store and fix bugs (#10)
MrCroxx May 25, 2023
d6a7a28
feat: add foyer bench, reorg workspace (#11)
MrCroxx May 26, 2023
3e9cc5f
fix: fix bug with bench (#12)
MrCroxx May 26, 2023
4d3a8e5
ci: add asan test (#13)
MrCroxx May 26, 2023
5c09e60
chore: add license checker (#14)
MrCroxx May 26, 2023
e38ad6a
chore: wrapper cache type, reorg utils, add metrics framework (#15)
MrCroxx May 29, 2023
f44aec1
fix: fix read only store recovery, impl random drop (#16)
MrCroxx May 29, 2023
8e80c6c
feat: add metrics (#17)
MrCroxx May 29, 2023
79610aa
feat: add log support (#19)
MrCroxx Jun 1, 2023
23e2612
feat: add write stall config for read only file store (#20)
MrCroxx Jun 8, 2023
506f3ef
feat: introduce instrusive indexers and collections (#21)
MrCroxx Jun 28, 2023
e9714c5
feat: introduce FTL-like storage engine (#22)
MrCroxx Jun 30, 2023
64b72b4
chore: remove unused deps (#28)
MrCroxx Jun 30, 2023
8388de6
feat: enable direct i/o on linux target (#29)
MrCroxx Jun 30, 2023
7a5624e
chore: remove unused old storage engien and other components (#30)
MrCroxx Jun 30, 2023
85d8341
feat: foyer storage bench support flexible writers and readers (#31)
MrCroxx Jun 30, 2023
7c81272
feat: impl storage recovery (#32)
MrCroxx Jul 1, 2023
ad3f125
feat: introduce segment fifo eviction policy (#35)
MrCroxx Jul 3, 2023
98a0af7
feat: export mods (#37)
MrCroxx Jul 3, 2023
a8a56cc
fix: export extern crate (#38)
MrCroxx Jul 3, 2023
09bf57a
Revert "fix: export extern crate (#38)" (#39)
MrCroxx Jul 3, 2023
691054a
fix: disable O_DIRECT on non-linux targets (#40)
MrCroxx Jul 3, 2023
f067d1c
fix: deadlock (#43)
MrCroxx Jul 4, 2023
7fc8542
chore: ignore Cargo.lock and bump toolchain (#46)
MrCroxx Jul 4, 2023
8979084
fix: gracefullly shutdown runners (#47)
MrCroxx Jul 4, 2023
1018bca
chore: export storage config (#50)
MrCroxx Jul 5, 2023
011a401
fix: AdmitAll & ReinsertNone no longer requires KV default (#51)
MrCroxx Jul 5, 2023
e61eb5d
fix: region advance & recovery & seal (#53)
MrCroxx Jul 6, 2023
f9548e6
feat: introduce prometheus metrics (#54)
MrCroxx Jul 6, 2023
3c0a0ca
fix: recovery test (#55)
MrCroxx Jul 6, 2023
809ca83
feat: support multiple admission or reinsertion policies, loose lock …
MrCroxx Jul 6, 2023
32ec880
feat: introduce rated random admission policy (#57)
MrCroxx Jul 7, 2023
d037322
feat: add rated random option for bench args (#58)
MrCroxx Jul 7, 2023
e502b30
fix: recovery run flushers and reclaimers first (#59)
MrCroxx Jul 7, 2023
296c51d
chore: remove old metrics, reclaim drop indices first (#60)
MrCroxx Jul 10, 2023
4086fb9
chore: remove unused and rename mod (#61)
MrCroxx Jul 10, 2023
b1512ad
fix: raise error in bench metrics instead of panic (#62)
MrCroxx Jul 11, 2023
2fe1e82
feat: introduce intrusive hashmap (#63)
MrCroxx Jul 12, 2023
0792d14
feat: introduce basic memory cache framework (#64)
MrCroxx Jul 12, 2023
0172d33
feat: sleep 10ms while trying to acquire exclusive lock (#65)
MrCroxx Jul 13, 2023
bd5be05
feat: introduce thread-safe rate limiter (#68)
MrCroxx Jul 13, 2023
5ffe36d
feat: introduce flush & reclaim rate limit (#70)
MrCroxx Jul 13, 2023
8381f02
feat: introduce intrusive duplicated hashmap (#71)
MrCroxx Jul 13, 2023
ef2999f
feat: add prometheus namespace config (#72)
MrCroxx Jul 14, 2023
754a038
feat: introduce event listener (#74)
MrCroxx Jul 15, 2023
6c42c7f
feat: introduce store writer (#75)
MrCroxx Jul 17, 2023
f7953be
fix: writer weight calculate (#76)
MrCroxx Jul 17, 2023
9f523b3
feat: refactor admission policy interface, fix rated random with mult…
MrCroxx Jul 20, 2023
67c99d2
feat: add more insert interfaces (#78)
MrCroxx Jul 21, 2023
a8c1c78
refactor: insert with interface allow return fetch value error (#79)
MrCroxx Jul 21, 2023
21e6ace
fix: refactor future interface in insert with (#80)
MrCroxx Jul 24, 2023
9669cf9
fix: reverse condition of insert if not exists (#81)
MrCroxx Jul 24, 2023
7017be8
fix: remove mistake cfg attr (#82)
MrCroxx Jul 25, 2023
270dc28
fix: make slice drop recoverable (#83)
MrCroxx Jul 25, 2023
af1e04a
chore: add makefile for check and test (#87)
MrCroxx Jul 25, 2023
72731f7
refactor: simplify some generic type definition (#85)
wenym1 Jul 26, 2023
68d761d
chore: add README and pr template (#88)
MrCroxx Jul 26, 2023
d88466c
feat: implement async queue with notify (#86)
wenym1 Jul 26, 2023
02b7761
feat: impl reinsertion (#89)
MrCroxx Jul 27, 2023
0b7a363
feat: impl poll mode flushers and reclaimers instead of push mode (#90)
MrCroxx Jul 28, 2023
7f19bf8
fix: resolve reinsertion stack by modify allocation (#91)
MrCroxx Jul 29, 2023
5109637
refactor: modify shutdown runners order, add hakari check (#93)
MrCroxx Jul 29, 2023
d3b2972
fix: ignore trivial error (#96)
MrCroxx Aug 1, 2023
94518d1
feat: add and use simple fifo by default (#97)
MrCroxx Aug 1, 2023
6bd19cb
fix: weight check (#98)
MrCroxx Aug 1, 2023
0e5a595
feat: remove index when storage lookup miss (#99)
MrCroxx Aug 1, 2023
049f538
refactor: simplify pointer trait and remove DefaultPointerOps (#100)
wenym1 Aug 3, 2023
8f7a7ae
chore: add codecov badge in README (#101)
MrCroxx Aug 3, 2023
2a37f4a
chore: update ci to fix codecov (#102)
MrCroxx Aug 4, 2023
552a95f
chore: ignore some code cov to make it more accurate (#103)
MrCroxx Aug 4, 2023
1c51add
Create dependabot.yml (#104)
MrCroxx Aug 8, 2023
36eeac9
chore(deps): update memoffset requirement from 0.8 to 0.9 (#106)
dependabot[bot] Aug 8, 2023
1629daf
chore(ci): use cargo-binstall to install tools (#107)
MrCroxx Aug 9, 2023
b949794
chore(deps): update itertools requirement from 0.10.5 to 0.11.0 (#105)
dependabot[bot] Aug 9, 2023
b8af0b6
chore: update makefile deps (#108)
MrCroxx Aug 9, 2023
c826f70
fix: build on latest nightly (#109)
xxchan Aug 22, 2023
0f4f808
chore: update readme (#110)
MrCroxx Aug 23, 2023
c6e3573
chore: fix workspace (#111)
MrCroxx Aug 23, 2023
86e2062
fix: fix insert duration (#112)
MrCroxx Aug 28, 2023
99b21df
chore: downgrade rust toolchain (#114)
MrCroxx Aug 29, 2023
cbf9fc6
chore(deps): update nix requirement from 0.26 to 0.27 (#113)
dependabot[bot] Aug 30, 2023
d78c864
refactor: use rust-prometheus global registry (#115)
MrCroxx Sep 1, 2023
e3579ec
chore: export inner op metrics (#116)
MrCroxx Sep 4, 2023
ecf8961
feat: integrate tracing framework (#118)
MrCroxx Sep 4, 2023
eb0eb45
feat: use sync lock in ErwLock instead of async lock (#119)
MrCroxx Sep 4, 2023
5f8d421
chore: enhance tracing (#122)
MrCroxx Sep 5, 2023
7885ee9
refactor: remove async slice drop (#123)
MrCroxx Sep 5, 2023
2b8907c
chore: export metrics registry (#124)
MrCroxx Sep 6, 2023
eed92cc
refactor: refactor cache file format, use header instead of footer (#…
MrCroxx Sep 6, 2023
10fd0f6
chore: monitor env setup (#127)
MrCroxx Sep 8, 2023
0346f69
chore: support keep prometheus data under .tmp (#128)
MrCroxx Sep 8, 2023
b3d4173
chore: use grafana provisioning (#129)
MrCroxx Sep 8, 2023
eba3317
chore: bump toolchain (#130)
MrCroxx Sep 10, 2023
d7d52d7
chore: udeps (#131)
MrCroxx Sep 10, 2023
93fb2e6
chore: use uint gauge instead (#132)
MrCroxx Sep 11, 2023
84a0554
fix: panic on recovery if pread len not match (#133)
MrCroxx Sep 11, 2023
2c6f080
chore: simplify pr template (#134)
MrCroxx Sep 11, 2023
4e81665
feat: introduce rated ticket admission & reinsertion policy (#135)
MrCroxx Sep 13, 2023
69926a0
fix: fix foyer storage bench tool analysis (#137)
MrCroxx Sep 13, 2023
2d886ba
feat: introduce force insert interface (#138)
MrCroxx Sep 13, 2023
41b1d39
chore: update pr template (#139)
MrCroxx Sep 13, 2023
ef773f2
refactor: refine allocation to make it fair (#140)
MrCroxx Sep 25, 2023
1217ea9
fix: fix recovery load unwrap (#142)
MrCroxx Sep 25, 2023
ac26695
chore: bench support entry size range (#143)
MrCroxx Sep 25, 2023
d74c629
refactor: refine erwlock (#144)
MrCroxx Sep 26, 2023
6b590c1
feat: support multiple allocators in round-robin order (#145)
MrCroxx Sep 26, 2023
80fe434
refactor: impl Debug for Store (#148)
MrCroxx Oct 6, 2023
baab65d
refactor: extract Storage trait and remove event listener (#149)
MrCroxx Oct 7, 2023
5a8aeef
chore: add udeps check (#150)
MrCroxx Oct 7, 2023
7e57346
feat: introduce lazy store (#151)
MrCroxx Oct 7, 2023
fc511d3
refactor: remod (#152)
MrCroxx Oct 7, 2023
974f7e5
chore: remove unused (#153)
MrCroxx Oct 7, 2023
7ca1a24
chore: fix lazy store clone (#154)
MrCroxx Oct 7, 2023
ae56c1a
chore: add codecov config (#155)
MrCroxx Oct 7, 2023
882d497
feat: introduce runtime store (#157)
MrCroxx Oct 8, 2023
5127202
test: introduce basic generic storage test (#158)
MrCroxx Oct 8, 2023
f85654c
chore: export LazyStore and RuntimeStore to simplify code (#159)
MrCroxx Oct 8, 2023
0b9445b
chore: export RuntimeLazyStore and fix fn ready (#160)
MrCroxx Oct 9, 2023
c92c6a0
refactor: move NoneStore into Store (#161)
MrCroxx Oct 9, 2023
168561b
feat: introduce async storage ext (#162)
MrCroxx Oct 9, 2023
8933a3d
feat: expose writer key & weight (#163)
MrCroxx Oct 9, 2023
feb1306
feat: support madsim (#164)
MrCroxx Oct 10, 2023
89456d5
chore: enable deterministic test on CI (#165)
MrCroxx Oct 10, 2023
91ef64b
chore: rename bench arg (#166)
MrCroxx Oct 10, 2023
9100e09
feat: bench tool support w/wo separate runtime (#167)
MrCroxx Oct 10, 2023
1c1416d
chore: remove unused code (#168)
MrCroxx Oct 10, 2023
b98edb3
chore: clean code (#169)
MrCroxx Oct 10, 2023
75f3363
feat: merge concurrent physical read (#170)
MrCroxx Oct 11, 2023
f097abe
chore: fix acquire clean buffer metrics (#171)
MrCroxx Oct 11, 2023
438eec8
refactor: move force to storage writer trait (#172)
MrCroxx Oct 11, 2023
cb6e7b5
chore: remove unused code (#173)
MrCroxx Oct 12, 2023
a42965f
refactor: refine devcie interface with buffer (#174)
MrCroxx Oct 12, 2023
d0d1dbc
feat: introduce RangeBoundsExt and refactor device interface (#175)
MrCroxx Oct 12, 2023
f2db309
chore(deps): update console-subscriber requirement from 0.1 to 0.2 (#…
dependabot[bot] Oct 13, 2023
691f84f
refactor: remove unnecessary unsafe silce usage (#176)
MrCroxx Oct 15, 2023
3490e3c
refactor: code api receives Buf and BufMut to support non-continuous …
MrCroxx Oct 16, 2023
6dec2f4
Revert "refactor: code api receives Buf and BufMut to support non-con…
MrCroxx Oct 17, 2023
338ead4
refactor: replace indices with catalog for further usage (#179)
MrCroxx Oct 18, 2023
f7dcdef
chore: update codecov ci (#156)
MrCroxx Oct 23, 2023
571e402
feat: introduce concurrent Continuum tracker (#181)
MrCroxx Oct 23, 2023
5d0134b
feat: introduce ring buffer (#182)
MrCroxx Oct 23, 2023
2261151
chore: bump toolchain to 2023-10-21 (#183)
TennyZhuang Oct 24, 2023
5b3ff18
chore: use semaphore to control recovery concurrency (#186)
MrCroxx Oct 26, 2023
6ebd85c
chore: introduce node exporter full in Grafana (#187)
MrCroxx Oct 26, 2023
0a43b72
chore: only keep minized dashboard (#188)
MrCroxx Oct 26, 2023
be5d3b8
refactor: refine write model to reduce tail latency (#184)
MrCroxx Oct 27, 2023
c36871e
chore: refine metrics for new write model (#189)
MrCroxx Oct 27, 2023
97c3872
feat: advance continuum when submit (#190)
MrCroxx Oct 27, 2023
73faf7a
fix: allow not power of 2 continuum capacity (#191)
MrCroxx Oct 27, 2023
524a2ee
refactor: cleanup unnecessary (#193)
MrCroxx Oct 30, 2023
a2b41d3
refactor: remove ErwLock usage (#195)
MrCroxx Oct 31, 2023
cc87aac
refactor: remove slice (#196)
MrCroxx Oct 31, 2023
929c06a
refactor: refine flush buffer, at most write once per entry (#197)
MrCroxx Oct 31, 2023
3578fb4
feat: support zstd compression (#198)
MrCroxx Nov 1, 2023
9232b3a
chore: cleanup config (#199)
MrCroxx Nov 1, 2023
0ba922e
chore: clear compression code logic (#201)
MrCroxx Nov 3, 2023
7b0cc9f
feat: add lz4 support (#202)
MrCroxx Nov 3, 2023
438344b
chore: tiny refactor about compression (#203)
MrCroxx Nov 3, 2023
f9b7d1b
feat: bench tool gen data based on real text (#204)
MrCroxx Nov 6, 2023
991032a
feat: support per entry compression algorithm (#205)
MrCroxx Nov 7, 2023
bde4294
feat: support coding error (#209)
MrCroxx Nov 8, 2023
4c32fe1
chore: bump opentelemetry version (#211)
MrCroxx Nov 10, 2023
ce2e222
feat: support insert if not exists async (#212)
MrCroxx Nov 13, 2023
a65ed18
chore: bench tool use madsim tokio (#213)
MrCroxx Nov 14, 2023
162c115
refactor: refactor admission and reinsertion policy with context (#217)
MrCroxx Nov 24, 2023
9b6f5de
chore: rustfmt enable import group fmt (#218)
MrCroxx Nov 24, 2023
64c47bc
chore: upgrade hyper to 1.0 (#219)
MrCroxx Nov 24, 2023
ca747d9
chore: upgrade itertools dep (#220)
MrCroxx Nov 24, 2023
0174078
feat: refine rate limiter (#221)
MrCroxx Nov 29, 2023
75d79bc
chore: bump foyer to 0.2.0 (#223)
MrCroxx Nov 29, 2023
fb5cd5e
feat: add format version in region header (#224)
MrCroxx Dec 4, 2023
4d38f4a
refactor: introduce cursor for serialization (#227)
MrCroxx Dec 12, 2023
d85af3e
refactor: require Key and Value to impl Clone (#228)
MrCroxx Dec 12, 2023
96c6caf
refactor: introduce inflight item into catalog, refactor coding (#229)
MrCroxx Dec 13, 2023
1942045
refactor: use key/value cursor for serialization, retire ring buffer …
MrCroxx Dec 15, 2023
83c581a
refactor: simplify cursor interface (#232)
MrCroxx Dec 15, 2023
e69bb9a
chore: remove unused ring buffer (#234)
MrCroxx Dec 15, 2023
1103266
chore: bump version to 0.3 (#235)
MrCroxx Dec 18, 2023
569f72c
chore: update metrics, add entry size histogram (#237)
MrCroxx Dec 18, 2023
e12ff68
chore: bump foyer-storage to 0.2.1 (#238)
MrCroxx Dec 18, 2023
01b8cc8
fix: restore writer drop metrics (#222)
MrCroxx Dec 19, 2023
360ee5f
feat: add insert if not exist with callback interface, add uts (#239)
MrCroxx Dec 19, 2023
5f2a760
chore: add CHANGELOG.md (#240)
MrCroxx Dec 19, 2023
c6836a3
feat: add insert_async_with_callback (#241)
MrCroxx Dec 20, 2023
130c7ab
Revert "feat: add insert_async_with_callback" (#242)
MrCroxx Dec 20, 2023
e39221f
feat: add insert_async_with_callback (#243)
MrCroxx Dec 20, 2023
9d2a6f9
chore: bump foyer-storage to 0.2.2 (#244)
MrCroxx Dec 20, 2023
fc7471d
chore: add typos check and fix typos (#248)
MrCroxx Dec 21, 2023
8e1da89
fix: fix benchmark tool read/write range sync (#247)
MrCroxx Dec 21, 2023
aac74bf
fix: fix another factor that make bench miss ratio not accurate (#249)
MrCroxx Dec 21, 2023
d9a78e0
chore: remove flusher_buffer_capacity to simplify config (#250)
MrCroxx Dec 22, 2023
aca33e9
chore: bump foyer version (#251)
MrCroxx Dec 22, 2023
d3b375e
fix: fix duplicated insert dropped metrics (#252)
MrCroxx Dec 22, 2023
32d5d3d
feat: introduce time-series distribution args to bench tool (#253)
MrCroxx Dec 26, 2023
fdde972
chore: remove unused ut (#254)
MrCroxx Dec 26, 2023
5df4976
chore: bump rust toolchain (#255)
MrCroxx Dec 27, 2023
eef8d78
chore: bump foyer 0.5.0 (#256)
MrCroxx Dec 28, 2023
e65b0a5
chore: update license (#258)
MrCroxx Jan 19, 2024
09b8b10
feat(experimental): introduce tombstone log (#257)
MrCroxx Jan 19, 2024
e837fa9
refactor: refine foyer-experimental-bench structure (#259)
MrCroxx Jan 23, 2024
d46ce2a
feat: introduce blocking notify (#260)
MrCroxx Jan 23, 2024
59d6a88
chore: fix typo, rename DList to Dlst to make it more Rustful (#271)
MrCroxx Feb 28, 2024
78c4d9d
Revert "chore: fix typo, rename DList to Dlst to make it more Rustful…
MrCroxx Feb 29, 2024
aea4d39
chore: fix typo, rename DList to Dlst to make it more Rustful (#273)
MrCroxx Feb 29, 2024
80755b7
refactor: use NonNull instead of raw pointer in foyer-intrusive (#274)
MrCroxx Feb 29, 2024
83d5678
chore: rename fn name for Pointer (#275)
MrCroxx Feb 29, 2024
4834cf8
chore: add comments max width fmt check (#276)
MrCroxx Mar 4, 2024
47048bc
chore: update code and comments width (#277)
MrCroxx Mar 4, 2024
fc3789b
chore: update the PR template (#280)
MrCroxx Mar 6, 2024
198b8ae
test: add asan and lsan for unit tests on CI (#282)
MrCroxx Mar 6, 2024
65c1646
feat: introduce new in-memory cache abstraction (#270)
MrCroxx Mar 7, 2024
0d5ee4c
feat: introduce metrics for in-memory cache (#283)
MrCroxx Mar 7, 2024
e8f8842
feat: introduce event listener for foyer-memory cache (#279)
MrCroxx Mar 7, 2024
ee8a9a9
feat: impl caffeine-like w-tinylfu for in-memory cache (#278)
MrCroxx Mar 11, 2024
7cb52d5
refactor: use generic type instead of associated type for listener
MrCroxx Mar 11, 2024
fd86347
refactor: use prelude mod to restrict visibility (#285)
MrCroxx Mar 11, 2024
960dddd
chore: upgrade dependencies, fix target auto detect (#286)
MrCroxx Mar 11, 2024
fe10803
refactor: introduce a unified cache context (#287)
MrCroxx Mar 11, 2024
7c3971f
refactor: unify in-memory cache to simplify usage (#288)
MrCroxx Mar 12, 2024
52cb3b7
test: add test for unified cache (#289)
MrCroxx Mar 12, 2024
0937254
chore: bump version and release foyer 0.6.0 (#290)
MrCroxx Mar 12, 2024
12eff65
fix: fix build with trace future (#291)
MrCroxx Mar 12, 2024
bd3fc1a
chore: bump bench tools version (#292)
MrCroxx Mar 13, 2024
4db04a2
refactor: impl Clone for config for simplification (#293)
MrCroxx Mar 14, 2024
fabed44
chore: bump foyer-memory to 0.1.1 (#294)
MrCroxx Mar 14, 2024
050a3d0
refactor: export DefaultCacheEventListener (#296)
MrCroxx Mar 21, 2024
524b645
chore: bump foyer-memory version (#297)
MrCroxx Mar 21, 2024
e76a499
feat: add eviction alg hit ratio bench (#299)
xiaguan Mar 31, 2024
6bea810
chore: update license (#295)
MrCroxx Mar 31, 2024
41eebba
feat: add S3Fifo eviction for memory (#303)
Ishiihara Apr 8, 2024
cd612f6
chore: bump foyer-intrusive to 0.3.1, foyer-memory to 0.1.3 (#307)
MrCroxx Apr 8, 2024
5899ee4
chore: bump foyer-storage to 0.5.1 (#309)
MrCroxx Apr 9, 2024
b50813b
fix: fix state() for s3fifo (#312)
MrCroxx Apr 9, 2024
5a410c8
chore: bump foyer-memory to 0.1.4 (#313)
MrCroxx Apr 9, 2024
823a879
refactor: use generic type for cursor instead of associated type (#314)
MrCroxx Apr 10, 2024
3aa689d
refactor: remove unstable feature let_chains and lint_reasons (#315)
MrCroxx Apr 10, 2024
2693669
refactor: remove usage of unstable features (#316)
MrCroxx Apr 10, 2024
e423dc4
refactor: use crate allocator_api2 to make foyer build on stable (#317)
MrCroxx Apr 10, 2024
3e8f334
test: run CI on both linux and macos (#318)
MrCroxx Apr 10, 2024
475aee0
doc: update README and add a simple example (#319)
MrCroxx Apr 11, 2024
2abe3df
chore: add msrv for foyer, update bager in readme (#321)
MrCroxx Apr 11, 2024
cb2616e
fix: do not truncate when open wal (#322)
MrCroxx Apr 11, 2024
48c3990
chore: bump foyer to 0.7.0 (#323)
MrCroxx Apr 11, 2024
cc64fc9
refactor: loose query key bound for in-memory cache (#324)
MrCroxx Apr 11, 2024
e47c090
feat: impl contains for in-memory cache (#325)
MrCroxx Apr 11, 2024
818e3f9
perf: add dynamic dispatch bench (#326)
MrCroxx Apr 12, 2024
3fda8cc
chore: fix ci coverage (#331)
MrCroxx Apr 12, 2024
6b820fa
refactor: refine generic handle type (#330)
MrCroxx Apr 12, 2024
41b6e07
refactor: a more friendly dynamic_dispatch bench
xiaguan Apr 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.'cfg(all())']
rustflags = ["--cfg", "tokio_unstable"]
30 changes: 30 additions & 0 deletions .config/hakari.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file contains settings for `cargo hakari`.
# See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options.

hakari-package = "foyer-workspace-hack"

# Format version for hakari's output. Version 4 requires cargo-hakari 0.9.22 or above.
dep-format-version = "4"

# Setting workspace.resolver = "2" in the root Cargo.toml is HIGHLY recommended.
# Hakari works much better with the new feature resolver.
# For more about the new feature resolver, see:
# https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver
resolver = "2"

# Add triples corresponding to platforms commonly used by developers here.
# https://doc.rust-lang.org/rustc/platform-support.html
platforms = [
# "x86_64-unknown-linux-gnu",
# "x86_64-apple-darwin",
# "x86_64-pc-windows-msvc",
]

# Write out exact versions rather than a semver range. (Defaults to false.)
# exact-versions = true

[traversal-excludes]
workspace-members = ["examples"]
third-party = [
{ name = "miniz_oxide" },
]
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
rebase-strategy: "disabled"
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## 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

## Checklist

- [ ] I have written the necessary rustdoc comments
- [ ] I have added the necessary unit tests and integration tests
- [ ] I have passed `make all` (or `make fast` instead if the old tests are not modified) in my local environment.

## Related issues or PRs (optional)
16 changes: 16 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Ref: https://github.com/zeke/semantic-pull-requests#configuration .
titleAndCommits: true
anyCommit: true
types:
- feat
- fix
- docs
- style
- refactor
- perf
- test
- build
- ci
- chore
- revert
allowMergeCommits: true
37 changes: 37 additions & 0 deletions .github/template/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# You will need to install yq >= 4.16 to use this tool.
# brew install yq

set -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR"


HEADER="""
# ================= THIS FILE IS AUTOMATICALLY GENERATED =================
#
# Please run generate.sh and commit after editing the workflow templates.
#
# ========================================================================
"""

# Generate workflow for main branch
echo "$HEADER" > ../workflows/main.yml
# shellcheck disable=SC2016
yq ea '. as $item ireduce ({}; . * $item )' template.yml main-override.yml | yq eval '... comments=""' - >> ../workflows/main.yml
echo "$HEADER" >> ../workflows/main.yml

# Generate workflow for pull requests
echo "$HEADER" > ../workflows/pull-request.yml
# shellcheck disable=SC2016
yq ea '. as $item ireduce ({}; . * $item )' template.yml pr-override.yml | yq eval '... comments=""' - >> ../workflows/pull-request.yml
echo "$HEADER" >> ../workflows/pull-request.yml

if [ "$1" == "--check" ] ; then
if ! git diff --exit-code; then
echo "Please run generate.sh and commit after editing the workflow templates."
exit 1
fi
fi
6 changes: 6 additions & 0 deletions .github/template/main-override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: CI (main)

on:
push:
branches: [main]
workflow_dispatch:
9 changes: 9 additions & 0 deletions .github/template/pr-override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: CI

on:
pull_request:
branches: [main]

concurrency:
group: environment-${{ github.ref }}
cancel-in-progress: true
241 changes: 241 additions & 0 deletions .github/template/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
name:

on:

env:
RUST_TOOLCHAIN: stable
RUST_TOOLCHAIN_NIGHTLY: nightly-2024-03-17
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: 20240410-2

jobs:
misc-check:
name: misc check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run typos check
uses: crate-ci/typos@master
- name: Install yq
run: |
wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${BINARY}.tar.gz -O - | tar xz && sudo mv ${BINARY} /usr/bin/yq
env:
YQ_VERSION: v4.16.1
BINARY: yq_linux_amd64
BUF_VERSION: 1.0.0-rc6
- name: Install jq
uses: dcarbone/install-jq-action@v2.0.2
- name: Check if CI workflows are up-to-date
run: |
./.github/template/generate.sh --check
- name: Check if Grafana dashboards are minimized
run: |
./scripts/minimize-dashboards.sh --check
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
rust-test:
name: rust test with codecov
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install rust toolchain@v1
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy, llvm-tools-preview
- name: Cache Cargo home
uses: actions/cache@v2
id: cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-rust-test
- name: Install cargo-binstall
if: steps.cache.outputs.cache-hit != 'true'
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
- name: Install cargo tools
if: steps.cache.outputs.cache-hit != 'true'
run: |
cargo binstall -y cargo-sort cargo-hakari
- name: Run rust cargo-sort check
run: |
cargo sort -w -c
- name: Run hakari check
run: |
cargo hakari generate --diff
cargo hakari manage-deps --dry-run
- name: Run rust format check
run: |
cargo fmt --all -- --check
- name: Run rust clippy check
run: |
cargo clippy --all-targets --features tokio-console -- -D warnings
cargo clippy --all-targets --features deadlock -- -D warnings
cargo clippy --all-targets -- -D warnings
- if: steps.cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@cargo-llvm-cov
- if: steps.cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@nextest
- name: Run rust test with coverage (igored tests)
run: |
cargo llvm-cov --no-report nextest --run-ignored ignored-only --no-capture --workspace
- name: Run rust test with coverage
run: |
cargo llvm-cov --no-report nextest
- name: Generate codecov report
run: |
cargo llvm-cov report --lcov --output-path lcov.info
- uses: codecov/codecov-action@v3
if: matrix.os == 'ubuntu-latest'
with:
verbose: true
deadlock:
name: run with single worker thread and deadlock detection
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install rust toolchain@v1
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Cache Cargo home
uses: actions/cache@v2
id: cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-deadlock
- name: Run foyer-storage-bench with single worker thread and deadlock detection
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "--cfg tokio_unstable"
RUST_LOG: info
TOKIO_WORKER_THREADS: 1
run: |-
cargo build --all --features deadlock
mkdir -p $GITHUB_WORKSPACE/foyer-data/foyer-storage-bench/deadlock
timeout 2m ./target/debug/foyer-storage-bench --dir $GITHUB_WORKSPACE/foyer-data/foyer-storage-bench/deadlock --capacity 256 --region-size 16 --lookup-range 1000 --w-rate 1 --r-rate 1 --ticket-insert-rate-limit 10 --time 60
asan:
name: run with address saniziter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install rust toolchain@v1
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN_NIGHTLY }}
- name: Cache Cargo home
uses: actions/cache@v2
id: cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-asan
- name: Run Unit Tests With Address Sanitizer
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-Zsanitizer=address --cfg tokio_unstable"
RUST_LOG: info
run: |-
cargo +${{ env.RUST_TOOLCHAIN_NIGHTLY }} test --lib --bins --tests --target x86_64-unknown-linux-gnu -- --nocapture
- name: Run foyer-storage-bench With Address Sanitizer
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-Zsanitizer=address --cfg tokio_unstable"
RUST_LOG: info
run: |-
cargo +${{ env.RUST_TOOLCHAIN_NIGHTLY }} build --all --target x86_64-unknown-linux-gnu
mkdir -p $GITHUB_WORKSPACE/foyer-data/foyer-storage-bench/asan
timeout 2m ./target/x86_64-unknown-linux-gnu/debug/foyer-storage-bench --dir $GITHUB_WORKSPACE/foyer-data/foyer-storage-bench/asan --capacity 256 --region-size 16 --lookup-range 1000 --w-rate 1 --r-rate 1 --ticket-insert-rate-limit 10 --time 60
lsan:
name: run with leak saniziter
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install rust toolchain@v1
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN_NIGHTLY }}
- name: Cache Cargo home
uses: actions/cache@v2
id: cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-lsan
- name: Run Unit Tests With Leak Sanitizer
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-Zsanitizer=leak --cfg tokio_unstable"
RUST_LOG: info
run: |-
cargo +${{ env.RUST_TOOLCHAIN_NIGHTLY }} test --lib --bins --tests --target x86_64-unknown-linux-gnu -- --nocapture
- name: Run foyer-storage-bench With Leak Sanitizer
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-Zsanitizer=leak --cfg tokio_unstable"
RUST_LOG: info
run: |-
cargo +${{ env.RUST_TOOLCHAIN_NIGHTLY }} build --all --target x86_64-unknown-linux-gnu
mkdir -p $GITHUB_WORKSPACE/foyer-data/foyer-storage-bench/lsan
timeout 2m ./target/x86_64-unknown-linux-gnu/debug/foyer-storage-bench --dir $GITHUB_WORKSPACE/foyer-data/foyer-storage-bench/lsan --capacity 256 --region-size 16 --lookup-range 1000 --w-rate 1 --r-rate 1 --ticket-insert-rate-limit 10 --time 60
deterministic-test:
name: run deterministic test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install rust toolchain@v1
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- name: Cache Cargo home
uses: actions/cache@v2
id: cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ env.CACHE_KEY_SUFFIX }}-deterministic-test
- if: steps.cache.outputs.cache-hit != 'true'
uses: taiki-e/install-action@nextest
- name: Run rust clippy check (madsim)
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "--cfg tokio_unstable --cfg madsim"
RUST_LOG: info
TOKIO_WORKER_THREADS: 1
run: |-
cargo clippy --all-targets
- name: Run nexmark test (madsim)
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "--cfg tokio_unstable --cfg madsim"
RUST_LOG: info
TOKIO_WORKER_THREADS: 1
run: |-
cargo nextest run --all
19 changes: 19 additions & 0 deletions .github/workflows/license_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: License Checker

on:
push:
branches:
- main
- "forks/*"
pull_request:
branches:
- main
- "v*.*.*-rc"
jobs:
license-header-check:
runs-on: ubuntu-latest
name: license-header-check
steps:
- uses: actions/checkout@v3
- name: Check License Header
uses: apache/skywalking-eyes/header@df70871af1a8109c9a5b1dc824faaf65246c5236
Loading
Loading