|
| 1 | +<div align="center"> |
| 2 | + <img src="doc/assets/logo.jpg" alt="libCacheSim Logo" width="640"> |
| 3 | +</div> |
| 4 | + |
| 5 | + |
1 | 6 | # libCacheSim - building and running cache simulations |
2 | 7 |
|
3 | 8 | [](https://github.com/1a1a11a/libCacheSim/actions/workflows/build.yml) |
|
6 | 11 | [](https://scorecard.dev/viewer/?uri=github.com/1a1a11a/libCacheSim) |
7 | 12 |
|
8 | 13 |
|
9 | | -<div align="center"> |
10 | | - <img src="doc/assets/logo.jpg" alt="libCacheSim Logo" width="640"> |
11 | | -</div> |
12 | | - |
13 | | - |
14 | 14 | ## News |
15 | 15 | * **2024 Oct**: **S3-FIFO** gets an upgrade! Please try out the new version (the old is now renamed to S3-FIFOv0). |
16 | 16 | * **2023 June**: **QDLP** is available now, see [our paper](https://dl.acm.org/doi/10.1145/3593856.3595887) for details. |
@@ -217,6 +217,9 @@ Constructing fine-grained miss ratio curves for large-scale workloads is very de |
217 | 217 | libCacheSim can be used as a library for building cache simulators. |
218 | 218 | For example, you can build a cache cluster with consistent hashing or a multi-layer cache simulator. |
219 | 219 |
|
| 220 | +<details> |
| 221 | +<summary> See a code example </summary> |
| 222 | + |
220 | 223 | Here is a simplified example showing the basic APIs. |
221 | 224 | ```c |
222 | 225 | #include <libCacheSim.h> |
@@ -258,6 +261,7 @@ To run the executable, |
258 | 261 | ```bash |
259 | 262 | ./test.out |
260 | 263 | ``` |
| 264 | +</details> |
261 | 265 |
|
262 | 266 | See [here](/doc/advanced_lib.md) for more details, and see [example folder](/example) for examples on how to use libCacheSim, such as building a cache cluster with consistent hashing, multi-layer cache simulators. |
263 | 267 |
|
@@ -297,6 +301,8 @@ print(f"Obj miss ratio: {obj_miss_ratio:.4f}, byte miss ratio: {byte_miss_ratio: |
297 | 301 | ### Extending new algorithm |
298 | 302 |
|
299 | 303 | With python package, you can extend new algorithm to test your own eviction design **without any C/C++ compilation**. |
| 304 | +<details> |
| 305 | +<summary> See an example below </summary> |
300 | 306 |
|
301 | 307 | ```python |
302 | 308 | import libcachesim as lcs |
@@ -332,6 +338,7 @@ obj_miss_ratio, byte_miss_ratio = cache.process_trace(reader) |
332 | 338 | print(f"Obj miss ratio: {obj_miss_ratio:.4f}, byte miss ratio: {byte_miss_ratio:.4f}") |
333 | 339 | ``` |
334 | 340 |
|
| 341 | +</details> |
335 | 342 |
|
336 | 343 | See more information in [README.md](./libCacheSim-python/README.md) of the Python binding. |
337 | 344 |
|
@@ -364,6 +371,9 @@ This project adheres to Google's coding style. By participating, you are expecte |
364 | 371 |
|
365 | 372 | --- |
366 | 373 | ## Reference |
| 374 | +<details> |
| 375 | +<summary> Please cite the following papers if you use libCacheSim. </summary> |
| 376 | + |
367 | 377 | ``` |
368 | 378 | @inproceedings{yang2020-workload, |
369 | 379 | author = {Juncheng Yang and Yao Yue and K. V. Rashmi}, |
@@ -399,7 +409,9 @@ This project adheres to Google's coding style. By participating, you are expecte |
399 | 409 | numpages = {10}, |
400 | 410 | } |
401 | 411 | ``` |
402 | | -If you used libCacheSim in your research, please cite the above papers. And we welcome you to send us a link to your paper and add a reference to [references.md](references.md). |
| 412 | +If you used libCacheSim in your research, please cite the above papers. |
| 413 | + |
| 414 | +</details> |
403 | 415 |
|
404 | 416 | --- |
405 | 417 |
|
|
0 commit comments