Skip to content

Commit e1d4130

Browse files
authored
Refactor README.md: Remove duplicate logo section and add details for code examples
1 parent daa2353 commit e1d4130

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

README.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<div align="center">
2+
<img src="doc/assets/logo.jpg" alt="libCacheSim Logo" width="640">
3+
</div>
4+
5+
16
# libCacheSim - building and running cache simulations
27

38
[![build](https://github.com/1a1a11a/libCacheSim/actions/workflows/build.yml/badge.svg)](https://github.com/1a1a11a/libCacheSim/actions/workflows/build.yml)
@@ -6,11 +11,6 @@
611
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/1a1a11a/libCacheSim/badge)](https://scorecard.dev/viewer/?uri=github.com/1a1a11a/libCacheSim)
712

813

9-
<div align="center">
10-
<img src="doc/assets/logo.jpg" alt="libCacheSim Logo" width="640">
11-
</div>
12-
13-
1414
## News
1515
* **2024 Oct**: **S3-FIFO** gets an upgrade! Please try out the new version (the old is now renamed to S3-FIFOv0).
1616
* **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
217217
libCacheSim can be used as a library for building cache simulators.
218218
For example, you can build a cache cluster with consistent hashing or a multi-layer cache simulator.
219219

220+
<details>
221+
<summary> See a code example </summary>
222+
220223
Here is a simplified example showing the basic APIs.
221224
```c
222225
#include <libCacheSim.h>
@@ -258,6 +261,7 @@ To run the executable,
258261
```bash
259262
./test.out
260263
```
264+
</details>
261265

262266
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.
263267

@@ -297,6 +301,8 @@ print(f"Obj miss ratio: {obj_miss_ratio:.4f}, byte miss ratio: {byte_miss_ratio:
297301
### Extending new algorithm
298302

299303
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>
300306

301307
```python
302308
import libcachesim as lcs
@@ -332,6 +338,7 @@ obj_miss_ratio, byte_miss_ratio = cache.process_trace(reader)
332338
print(f"Obj miss ratio: {obj_miss_ratio:.4f}, byte miss ratio: {byte_miss_ratio:.4f}")
333339
```
334340

341+
</details>
335342

336343
See more information in [README.md](./libCacheSim-python/README.md) of the Python binding.
337344

@@ -364,6 +371,9 @@ This project adheres to Google's coding style. By participating, you are expecte
364371

365372
---
366373
## Reference
374+
<details>
375+
<summary> Please cite the following papers if you use libCacheSim. </summary>
376+
367377
```
368378
@inproceedings{yang2020-workload,
369379
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
399409
numpages = {10},
400410
}
401411
```
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>
403415

404416
---
405417

0 commit comments

Comments
 (0)