Skip to content

Commit a04c33c

Browse files
authored
[Chore] Refine comments in example (#34)
1 parent 9355b02 commit a04c33c

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ cache = lcs.S3FIFO(
7575
req_miss_ratio, byte_miss_ratio = cache.process_trace(reader)
7676
print(f"Request miss ratio: {req_miss_ratio:.4f}, Byte miss ratio: {byte_miss_ratio:.4f}")
7777

78-
# Step 3.1: Further process the first 1000 requests again
78+
# Step 3.1: Process the first 1000 requests
7979
cache = lcs.S3FIFO(
8080
cache_size=1024 * 1024,
8181
# Cache specific parameters

docs/src/en/getting_started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ With libcachesim installed, you can start cache simulation for some eviction alg
7777
req_miss_ratio, byte_miss_ratio = cache.process_trace(reader)
7878
print(f"Request miss ratio: {req_miss_ratio:.4f}, Byte miss ratio: {byte_miss_ratio:.4f}")
7979

80-
# Step 3.1: Further process the first 1000 requests again
80+
# Step 3.1: Process the first 1000 requests
8181
cache = lcs.S3FIFO(
8282
cache_size=1024 * 1024,
8383
# Cache specific parameters

examples/basic_usage.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
req_miss_ratio, byte_miss_ratio = cache.process_trace(reader)
2222
print(f"Request miss ratio: {req_miss_ratio:.4f}, Byte miss ratio: {byte_miss_ratio:.4f}")
2323

24-
# Step 3.1: Further process the first 1000 requests again
24+
# Step 3.1: Process the first 1000 requests
25+
cache = lcs.S3FIFO(
26+
cache_size=1024 * 1024,
27+
# Cache specific parameters
28+
small_size_ratio=0.2,
29+
ghost_size_ratio=0.8,
30+
move_to_main_threshold=2,
31+
)
2532
req_miss_ratio, byte_miss_ratio = cache.process_trace(reader, start_req=0, max_req=1000)
26-
print(f"Request miss ratio: {req_miss_ratio:.4f}, Byte miss ratio: {byte_miss_ratio:.4f}")
33+
print(f"Request miss ratio: {req_miss_ratio:.4f}, Byte miss ratio: {byte_miss_ratio:.4f}")

0 commit comments

Comments
 (0)