Skip to content

Commit

Permalink
fix preprocess data
Browse files Browse the repository at this point in the history
  • Loading branch information
Krien committed Apr 2, 2023
1 parent 2a1f15c commit 7329c3a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 12 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ In the `zns.trace/` directory, we provide a framework to trace activity on zns d

## Evaluation

In the `evaluation/` directory we provide a benchmarking setup for evaluating the performance of the zns-tools, and an end-to-end visualization framework for RocksDB to analyze and visualize the data movement of flush/compaction operations, as well as F2FS Zone management operations.
In the `evaluation/` directory we provide a benchmarking setup for evaluating the performance of the zns-tools, and an end-to-end visualization framework for RocksDB to analyze and visualize the data movement of flush/compaction operations, as well as F2FS Zone management operations.

### Setup

Expand All @@ -299,4 +299,6 @@ To run the RocksDB workload, a script is provided that executes all necessary to
sh ./timeline_data_rocksdb_gen.sh
```

To then visualize the data, copy it to the `../timeline-gen/` directory and execute the cells in the `plot.ipynb` notebook (`jupyter notebook` to start the notebook).
Afterwards data should be preprocessed for plotting by running the notebook `preprocess.ipynb` (`jupyter notebook` to start the notebook). It should create `data.json` in `../timeline-gen`.

To then visualize the data, move to `../timeline-gen/` directory and execute the cells in the `plot.ipynb` notebook (`jupyter notebook` to start the notebook).
45 changes: 35 additions & 10 deletions evaluation/timeline-data/preprocess_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,6 @@
" ptr_jobs = ptr_jobs + 1\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4f814114",
"metadata": {},
"outputs": [],
"source": [
"compactions"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -496,6 +486,14 @@
" } for z in json.loads(zone_data)['zone_list']] "
]
},
{
"cell_type": "markdown",
"id": "66757695",
"metadata": {},
"source": [
"# Score recreation"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -565,6 +563,14 @@
" print(\"diff\", dif)"
]
},
{
"cell_type": "markdown",
"id": "9395fe41",
"metadata": {},
"source": [
"# Printing"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -610,6 +616,25 @@
" rr = [x[1] for x in compactions[job]['past_resets']]\n",
" print(' R:', rr)\n"
]
},
{
"cell_type": "markdown",
"id": "7aee51cd",
"metadata": {},
"source": [
"# Generate JSON"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3b927407",
"metadata": {},
"outputs": [],
"source": [
"with open('../timeline-gen/data.json', 'w') as f:\\n\",\n",
" json.dump(compactions, f, indent=4)\""
]
}
],
"metadata": {
Expand Down

0 comments on commit 7329c3a

Please sign in to comment.