You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+21-22Lines changed: 21 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,15 @@ This is a project to benchmark different implementations of queues (currently FI
3
3
4
4
# Contents
5
5
-[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)
11
10
-[Add your own queues](#add-your-own-queues)
12
-
-[IDE Help](#ide-help)
13
11
-[Order test](#order-test)
14
12
-[Adding C/C++ queues](#adding-cc-queues)
15
13
-[Output files](#output-files)
16
-
-[BFS](#bfs-1)
14
+
-[BFS](#bfs)
17
15
-[Logging](#logging)
18
16
19
17
## How to use:
@@ -36,14 +34,7 @@ This will compile and run the benchmarking framework. It will run the `prod-con`
36
34
37
35
There are several useful scripts located inside the `scripts` folder, as well as a README which describes how to use them.
38
36
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
47
38
Implemented Rust queues are:
48
39
*`array_queue` - A queue from the crate [`crossbeam`](https://crates.io/crates/crossbeam).
49
40
*`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:
77
68
*`scc_stack` - An unbounded lock-free stack from the crate [`scc`](https://crates.io/crates/scc).
78
69
*`scc2_stack` - An unbounded lock-free stack from the crate [`scc2`](https://crates.io/crates/scc2).
79
70
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.
84
71
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
86
80
To use specific values you can add different flags to the run command:
87
81
* General flags:
88
82
*`-t`, `--time-limit` for specific time values.
@@ -99,12 +93,17 @@ To use specific values you can add different flags to the run command:
99
93
*`prod-con` benchmark type sub commands:
100
94
*`-p`, `--producers` for specified amount of producers.
101
95
*`-c`, `--consumers` for specified amount of consumers.
102
-
-`enq-deq` benchmark type sub commands:
96
+
*`enq-deq` benchmark type sub commands:
103
97
*`--spread` - To specify the spread for the `enq-deq` benchmark type.
104
98
*`--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:
106
100
*`--thread-count` - To specify the amount of threads in the `enq-deq-pairs` benchmark type.
107
101
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
+
108
107
## Add your own queues
109
108
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).
0 commit comments