@@ -12,60 +12,21 @@ Benchmark suite for [`rsonpath`](https://github.com/v0ldek/rsonpath).
1212
1313## Prerequisites
1414
15- By default, the benches are performed against a released version of ` rsonpath ` .
16- Usually you might want to run it against the local version to test your changes.
17- To do that, pass a [ patch config value] to ` cargo ` :
15+ By default, the benches are performed against the local version of ` rsonpath ` in the local repository.
1816
19- ``` ini
20- --config ' patch.crates-io.rsonpath.path = "../rsonpath"'
21- ```
22-
23- Additionally:
24-
25- 1 . An appropriate C++ compiler is required for the [ ` cc ` crate] ( https://lib.rs/crates/cc ) to compile the
26- JSONSki code.
27- 2 . JDK of version at least 8 is required and your ` JAVA_HOME ` environment variable must be set
17+ 1 . JDK of version at least 8 is required and your ` JAVA_HOME ` environment variable must be set
2818 to its location.
19+ 2 . You need ` gradle ` to create the required wrapper JAR to build JSurfer. To install ` gradle ` it's recommended to use
20+ [ ` SDKMan ` ] ( https://sdkman.io/ ) : ` sdk install gradle 7.5 ` . After that is done, run ` just init ` in the root of ` rsonpath-benchmarks ` .
21+ This needs to be done only once.
2922
3023On x86_64 Ubuntu the latters can be done by installing ` openjdk-17-jdk ` and exporting ` JAVA_HOME ` as
3124` /usr/lib/jvm/java-1.17.0-openjdk-amd64 ` .
3225
3326### Download the dataset
3427
35- On a UNIX system with ` wget ` installed run the script ` sh dl.sh ` .
36- You can also manually download the dataset and put the JSON files in the correct folder.
37-
38- For more information, refers to:
39-
40- * AST: [ ![ DOI] ( https://zenodo.org/badge/DOI/10.5281/zenodo.7229269.svg )] ( https://doi.org/10.5281/zenodo.7229269 )
41- * Twitter: [ ![ DOI] ( https://zenodo.org/badge/DOI/10.5281/zenodo.7229287.svg )] ( https://doi.org/10.5281/zenodo.7229287 )
42- * Crossref: [ ![ DOI] ( https://zenodo.org/badge/DOI/10.5281/zenodo.7229287.svg )] ( https://doi.org/10.5281/zenodo.7231920 )
43-
44- For the benchmark to work, the directory layout should be as follows:
45-
46- ``` ini
47- ── data
48- ├── ast
49- │ └── ast.json
50- ├── crossref
51- │ ├── crossref0.json
52- │ ├── crossref16.json
53- │ ├── crossref1.json
54- │ ├── crossref2.json
55- │ ├── crossref4.json
56- │ └── crossref8.json
57- └── twitter
58- └── twitter.json
59- ```
60-
61- The sha256sum of the JSON files, for reference:
62-
63- * ` c3ff840d153953ee08c1d9622b20f8c1dc367ae2abcb9c85d44100c6209571af ast/ast.json `
64- * ` f76da4fbd5c18889012ab9bbc222cc439b4b28f458193d297666f56fc69ec500 crossref/crossref/crossref1.json `
65- * ` 95e0038e46ce2e94a0f9dde35ec7975280194220878f83436e320881ccd252b4 crossref/crossref/crossref2.json `
66- * ` f14e65d4f8df3c9144748191c1e9d46a030067af86d0cc03cc67f22149143c5d twitter/twitter.json `
67-
68- TODO: checksums of other crossrefs
28+ Datasets are automatically downloaded on demand when an appropriate benchmark is ran. The datasets are also
29+ automatically checked against their known SHA256 checksum to verify integrity.
6930
7031## Usage
7132
@@ -83,12 +44,6 @@ cargo bench --bench <dataset> --no-default-features
8344
8445The folder ` target/criterion ` contains all the information needed to plot the experiment.
8546
86- As a reminder, to test against local changes instead of a crates.io version:
87-
88- ``` bash
89- cargo bench --bench < dataset> --config ' patch.crates-io.rsonpath.path = "../rsonpath"'
90- ```
91-
9247## Plotting
9348
9449To plot the result once the is bench done:
0 commit comments