-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: update user guide & documentation for next release (#12)
* doc: add honeycomb-utils page to UG * doc: add Rust project setup instructions also, mention honeycomb-utils in index & workspace pages * doc: update README * doc: bump version of packages & update honeycomb-core todo list
- Loading branch information
Showing
8 changed files
with
119 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "honeycomb-core" | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
edition = "2021" | ||
|
||
[features] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# honeycomb-utils | ||
|
||
[Documentation](../honeycomb_utils/) | ||
|
||
--- | ||
|
||
**honeycomb-utils** is a Rust crate that provides utility functions to | ||
the user (and developer) in order to write benchmarks and tests more | ||
easily. A number of benchmarks are already defined in this crate using the | ||
[criterion][CRITERION] and [iai-callgrind][IAI] crates. Additionally, | ||
one example is provided to illustrate the result of the different *size* | ||
methods on a given map, as well as a plotting script for the methods' output. | ||
|
||
Note that the **iai-callgrind** benchmarks require their runner to be | ||
installed as well as Valgrind. Refer to the crate's [README][IAIRM] for | ||
detailed instructions. | ||
|
||
|
||
## Usage | ||
|
||
### Benchmarks | ||
|
||
You can run benchmarks using the following commands: | ||
|
||
```shell | ||
# Run all benchmarks | ||
cargo bench --benches | ||
|
||
# Run a specific benchmark | ||
cargo bench --bench <BENCHMARK> | ||
``` | ||
|
||
The following benchmarks are available: | ||
|
||
| Name | Type | Source file | | ||
|-------------------------------|---------------|-----------------------------------| | ||
| `splitsquaremap-init` | Criterion | `benches/splitsquaremap/init.rs` | | ||
| `splitsquaremap-shift` | Criterion | `benches/splitsquaremap/shift.rs` | | ||
| `squaremap-init` | Criterion | `benches/squaremap/init.rs` | | ||
| `squaremap-shift` | Criterion | `benches/squaremap/shift.rs` | | ||
| `squaremap-splitquads` | Criterion | `benches/squaremap/split.rs` | | ||
| `prof-twomap-editing` | Iai-callgrind | `benches/core/twomap/editing.rs` | | ||
| `prof-twomap-reading` | Iai-callgrind | `benches/core/twomap/reading.rs` | | ||
| `prof-twomap-sewing-unsewing` | Iai-callgrind | `benches/core/twomap/sewing.rs` | | ||
|
||
A detailed explanation about the purpose of each benchmark is provided at the beginning | ||
of their respective source files. As a rule of thumb, the **iai-callgrind** benchmarks | ||
cover individual methods of the structure while **criterion** benchmarks cover higher | ||
level computations. | ||
|
||
|
||
### Examples | ||
|
||
You can run examples using the following command: | ||
|
||
```shell | ||
# Run a specific example | ||
cargo run --example <EXAMPLE> | ||
``` | ||
|
||
The following examples are available: | ||
|
||
| Name | Description | | ||
|----------------|-------------| | ||
| `memory_usage` | Outputs the memory usage of a given map as three *csv* files. These files can be used to generate charts using the `memory_usage.py` script | | ||
|
||
|
||
### Scripts | ||
|
||
- `memory_usage.py` - **requires matplotlib** - Plots pie charts using a *csv* file produced by a size method of TwoMap. | ||
|
||
|
||
[CRITERION]: https://github.com/bheisler/criterion.rs | ||
[IAI]: https://github.com/iai-callgrind/iai-callgrind | ||
[IAIRM]: https://github.com/iai-callgrind/iai-callgrind?tab=readme-ov-file#installation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters