Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ cache = lcs.S3FIFO(
req_miss_ratio, byte_miss_ratio = cache.process_trace(reader)
print(f"Request miss ratio: {req_miss_ratio:.4f}, Byte miss ratio: {byte_miss_ratio:.4f}")

# Step 3.1: Further process the first 1000 requests again
# Step 3.1: Process the first 1000 requests
cache = lcs.S3FIFO(
cache_size=1024 * 1024,
# Cache specific parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/src/en/getting_started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ With libcachesim installed, you can start cache simulation for some eviction alg
req_miss_ratio, byte_miss_ratio = cache.process_trace(reader)
print(f"Request miss ratio: {req_miss_ratio:.4f}, Byte miss ratio: {byte_miss_ratio:.4f}")

# Step 3.1: Further process the first 1000 requests again
# Step 3.1: Process the first 1000 requests
cache = lcs.S3FIFO(
cache_size=1024 * 1024,
# Cache specific parameters
Expand Down
11 changes: 9 additions & 2 deletions examples/basic_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
req_miss_ratio, byte_miss_ratio = cache.process_trace(reader)
print(f"Request miss ratio: {req_miss_ratio:.4f}, Byte miss ratio: {byte_miss_ratio:.4f}")

# Step 3.1: Further process the first 1000 requests again
# Step 3.1: Process the first 1000 requests
cache = lcs.S3FIFO(
cache_size=1024 * 1024,
# Cache specific parameters
small_size_ratio=0.2,
ghost_size_ratio=0.8,
move_to_main_threshold=2,
)
req_miss_ratio, byte_miss_ratio = cache.process_trace(reader, start_req=0, max_req=1000)
print(f"Request miss ratio: {req_miss_ratio:.4f}, Byte miss ratio: {byte_miss_ratio:.4f}")
print(f"Request miss ratio: {req_miss_ratio:.4f}, Byte miss ratio: {byte_miss_ratio:.4f}")
Loading