Breaking: Switch to BSON for storage #48
Merged
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.
While implementing
load_benchmarks(:latest)
it became apparent that stringifying everything before saving wasn't ideal (#45, #46, #43), and attempting to invert stringifying (35ed40a) started to balloon (Adding support forjudge
was getting hacky). So instead I've decided to switch to a serializer that wouldn't stringify everything.Serialization.serialize
- Smallest file size of all methods. But lacks stability (by design) across versions and machines. While benchmarking results tend to lose value quickly, I do want to support judging between versions / across machines.JLD2
- Large file size, even when compressedJLD
- Would add a dependency on HDF5, large file size, and slowJSON
- Stringifies most data, mangling the keys for benchmark groups.Backwards compatibility
PkgJogger v0.4 and later will save results using BSON to
*.bson.gz
files. Loading results withload_benchmarks
from*.json.gz
files is supported by PkgJogger v0.4, but will be removed in a future release.Other Changes
This PR also adds support for
JogExample.load_benchmarks(:lastest)
andJogExample.load_benchmarks(:oldest)
to load the most recent / oldest results from disk. The:latest
and:oldest
identifiers are supported byjudge
andtune!
as well.