You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/en/getting_started/quickstart.md
+6-11Lines changed: 6 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,11 +91,10 @@ With libcachesim installed, you can start cache simulation for some eviction alg
91
91
92
92
The above example demonstrates the basic workflow of using `libcachesim` for cache simulation:
93
93
94
-
1. Use `DataLoader` to download a cache trace file from an S3 bucket.
95
-
2. Open and efficiently process the trace file with `TraceReader`.
96
-
3. Initialize a cache object (here, `S3FIFO`) with a specified cache size (e.g., 1MB).
97
-
4. Run the simulation on the entire trace using `process_trace` to obtain object and byte miss ratios.
98
-
5. Optionally, process only a portion of the trace by specifying `start_req` and `max_req` for partial simulation.
94
+
1. Open and efficiently process the trace file with `TraceReader`.
95
+
2. Initialize a cache object (here, `S3FIFO`) with a specified cache size (e.g., 1MB).
96
+
3. Run the simulation on the entire trace using `process_trace` to obtain object and byte miss ratios.
97
+
4. Optionally, process only a portion of the trace by specifying `start_req` and `max_req` for partial simulation.
99
98
100
99
This workflow applies to most cache algorithms and trace types, making it easy to get started and customize your experiments.
101
100
@@ -108,10 +107,7 @@ Here is an example demonstrating how to use `TraceAnalyzer`.
108
107
import libcachesim as lcs
109
108
110
109
# Step 1: Get one trace from S3 bucket
111
-
URI = "cache_dataset_oracleGeneral/2007_msr/msr_hm_0.oracleGeneral.zst"
112
-
dl = lcs.DataLoader()
113
-
dl.load(URI)
114
-
110
+
URI = "s3://cache-datasets/cache_dataset_oracleGeneral/2007_msr/msr_hm_0.oracleGeneral.zst"
115
111
reader = lcs.TraceReader(
116
112
trace = dl.get_cache_path(URI),
117
113
trace_type = lcs.TraceType.ORACLE_GENERAL_TRACE,
@@ -143,8 +139,7 @@ Here is an example demonstrating how to use `TraceAnalyzer`.
143
139
144
140
The above code demonstrates how to perform trace analysis using `libcachesim`. The workflow is as follows:
145
141
146
-
1. Download a trace file from an S3 bucket using `DataLoader`.
147
-
2. Open the trace file with `TraceReader`, specifying the trace type and any reader initialization parameters.
142
+
1. Open the trace file with `TraceReader`, specifying the trace type and any reader initialization parameters. The URI starting with `s3://`, will download a trace file from an S3 bucket.
148
143
3. Configure the analysis options with `AnalysisOption` to enable or disable specific analyses (such as request rate, size, etc.).
149
144
4. Optionally, set additional analysis parameters with `AnalysisParam`.
150
145
5. Create a `TraceAnalyzer` object with the reader, output directory, and the chosen options and parameters.
0 commit comments