Skip to content

Commit 6e2fcee

Browse files
committed
Rearrange README contents
Now subjectively has a nicer flow.
1 parent 7260175 commit 6e2fcee

1 file changed

Lines changed: 21 additions & 22 deletions

File tree

readme.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@ This is a project to benchmark different implementations of queues (currently FI
33

44
# Contents
55
- [How to use](#how-to-use)
6-
- [BFS](#bfs)
7-
- [Benchmark types](#benchmark-types)
8-
- [Queue implementations and features](#queue-implementations-and-features)
9-
- [Optional extra feature](#optional-extra-feature)
10-
- [Flags](#flags)
6+
- [Queue implementations](#queue-implementations)
7+
- [Benchmarks](#benchmarks)
8+
- [Flags](#flags)
9+
- [Optional features](#optional-features)
1110
- [Add your own queues](#add-your-own-queues)
12-
- [IDE Help](#ide-help)
1311
- [Order test](#order-test)
1412
- [Adding C/C++ queues](#adding-cc-queues)
1513
- [Output files](#output-files)
16-
- [BFS](#bfs-1)
14+
- [BFS](#bfs)
1715
- [Logging](#logging)
1816

1917
## How to use:
@@ -36,14 +34,7 @@ This will compile and run the benchmarking framework. It will run the `prod-con`
3634

3735
There are several useful scripts located inside the `scripts` folder, as well as a README which describes how to use them.
3836

39-
## Benchmark types
40-
You have to choose which type of benchmark you want to run for your queue. They have sub-commands specific to themselves. Use the `--help` flag to print a help text about the sub-commands.
41-
* `prod-con` - Measures throughput and fairness. Threads are either producers or consumers. You can choose the amount of producers and consumers using their respective flags.
42-
* `enq-deq` - Measures throughput and fairness. Threads alternate between enqueueing and dequeueing randomly. You can choose the spread of enqueuers/dequeuers using the `--spread` flag. Using the `--thread-count` flag you can decide how many threads you want to use for the benchmark.
43-
* `bfs` - Measures execution time. Performs a parallell breadth-first search on a graph of your choosing. After the execution, the benchmark will also do a sequential search to verify the parallel solution. The verification can be turned off by passing the `--no-verify` flag. Choose graph file by passing the `--graph-file` flag and specifying the path. The benchmark supports `.mtx` files. You can run several iterations of BFS by passing the `-i` flag, just as in the other benchmarks. The graph file will only be loaded once, and the sequential solution will also only be generated once.
44-
* `enq-deq-pairs` - Measures throughput and fairness. Threads first enqueue an item, then immediately dequeues an item. Use `--thread-count` to change the amount of threads.
45-
46-
## Queue implementations and features
37+
## Queue implementations
4738
Implemented Rust queues are:
4839
* `array_queue` - A queue from the crate [`crossbeam`](https://crates.io/crates/crossbeam).
4940
* `atomic_queue` - A queue from the crate [`atomic-queue`](https://crates.io/crates/atomic-queue).
@@ -77,12 +68,15 @@ There are also the following Rust stacks:
7768
* `scc_stack` - An unbounded lock-free stack from the crate [`scc`](https://crates.io/crates/scc).
7869
* `scc2_stack` - An unbounded lock-free stack from the crate [`scc2`](https://crates.io/crates/scc2).
7970

80-
### Optional extra feature:
81-
* `benchmark_core/memory_tracking` - Writes to a file the memory allocated by the program during the execution. Requires `jemalloc`, so should work on most UNIX systems.
82-
* `silent-release` - Compiles the benchmarking tool without any logging. Need to pass the `--no-default-features` to work.
83-
* `verbose-release` - Compiles the benchmarking tool with all log levels. Need to pass the `--no-default-features` to work.
8471

85-
## Flags
72+
## Benchmarks
73+
You have to choose which type of benchmark you want to run for your queue. They have sub-commands specific to themselves. Use the `--help` flag to print a help text about the sub-commands.
74+
* `prod-con` - Measures throughput and fairness. Threads are either producers or consumers. You can choose the amount of producers and consumers using their respective flags.
75+
* `enq-deq` - Measures throughput and fairness. Threads alternate between enqueueing and dequeueing randomly. You can choose the spread of enqueuers/dequeuers using the `--spread` flag. Using the `--thread-count` flag you can decide how many threads you want to use for the benchmark.
76+
* `bfs` - Measures execution time. Performs a parallell breadth-first search on a graph of your choosing. After the execution, the benchmark will also do a sequential search to verify the parallel solution. The verification can be turned off by passing the `--no-verify` flag. Choose graph file by passing the `--graph-file` flag and specifying the path. The benchmark supports `.mtx` files. You can run several iterations of BFS by passing the `-i` flag, just as in the other benchmarks. The graph file will only be loaded once, and the sequential solution will also only be generated once.
77+
* `enq-deq-pairs` - Measures throughput and fairness. Threads first enqueue an item, then immediately dequeues an item. Use `--thread-count` to change the amount of threads.
78+
79+
### Flags
8680
To use specific values you can add different flags to the run command:
8781
* General flags:
8882
* `-t`, `--time-limit` for specific time values.
@@ -99,12 +93,17 @@ To use specific values you can add different flags to the run command:
9993
* `prod-con` benchmark type sub commands:
10094
* `-p`, `--producers` for specified amount of producers.
10195
* `-c`, `--consumers` for specified amount of consumers.
102-
- `enq-deq` benchmark type sub commands:
96+
* `enq-deq` benchmark type sub commands:
10397
* `--spread` - To specify the spread for the `enq-deq` benchmark type.
10498
* `--thread-count` - To specify the amount of threads in the `enq-deq` benchmark type.
105-
- `enq-deq-pairs` benchmark type sub commands:
99+
* `enq-deq-pairs` benchmark type sub commands:
106100
* `--thread-count` - To specify the amount of threads in the `enq-deq-pairs` benchmark type.
107101

102+
### Optional features
103+
* `benchmark_core/memory_tracking` - Writes to a file the memory allocated by the program during the execution. Requires `jemalloc`, so should work on most UNIX systems.
104+
* `silent-release` - Compiles the benchmarking tool without any logging. Need to pass the `--no-default-features` to work.
105+
* `verbose-release` - Compiles the benchmarking tool with all log levels. Need to pass the `--no-default-features` to work.
106+
108107
## Add your own queues
109108
To add your own queues to the benchmarking suite, it should be added as a workspace member, preferably in `queues/`. This requires adding it as a member in `Cargo.toml`, and then adding its package folder similarly to the packages in `queues` (it should have the main `main.tex`, with the exception of the selected queue).
110109

0 commit comments

Comments
 (0)