Unify result print format to be ignore-obj-size-aware #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When print simulation results (except for [info]), unify the format with the logic as follows:
if
ignore-obj-size=False
, cache size is xxB/KiB/MiB ... (align with common.py)else, cache size is a pure number (the number of objects).
# multi sim is ignore-obj-size-aware in the print format, however, single is not $ ../_build/bin/cachesim ../data/cloudPhysicsIO.vscsi vscsi s3fifo 0.1 --ignore-obj-size 0 ../data/cloudPhysicsIO.vscsi S3FIFO-0.1000-2 cache size 194MiB, 113872 req, miss ratio 0.7273, throughput 5.87 MQPS $ ../_build/bin/cachesim ../data/cloudPhysicsIO.vscsi vscsi s3fifo 0.1 --ignore-obj-size 1 ../data/cloudPhysicsIO.vscsi S3FIFO-0.1000-2 cache size 5KiB, 113872 req, miss ratio 0.7525, throughput 5.87 MQPS
besides, when the size is less than 1KiB, no unit will also be confusing so we can add a unit "B" (Byte) for the case
--ignore-obj-size 0
.After modification,