-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples: add latency examples; update readme
- Loading branch information
1 parent
f6e92d3
commit d0b3958
Showing
10 changed files
with
112 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
This example shows the latency measurement of the [writeheavy](../writeheavy/) | ||
and [readpopular](../readpopular/) examples. Their descriptions can be found in their own | ||
directories. | ||
|
||
AMD Ryzen 9 5950X CPU 0-15 results (writeheavy, [pdf](latency-writeheavy.pdf)): | ||
|
||
![latency-writeheavy](latency-writeheavy.png) | ||
|
||
|
||
AMD Ryzen 9 5950X CPU 0-15 results (readpopular, [pdf](latency-readpopular.pdf)): | ||
|
||
![latency-readpopular](latency-readpopular.png) |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,74 @@ | ||
set terminal pdf size 10,3 | ||
set xlabel "Threads" | ||
set key left top | ||
|
||
set output "latency-writeheavy.pdf" | ||
set multiplot layout 1,3 | ||
set ylabel "Average Latency (ns)" | ||
plot [0:17] [0:] \ | ||
"chashmap-writeheavy.txt" using 2:20 with lp ti "chashmap",\ | ||
"contrie-writeheavy.txt" using 2:20 with lp ti "contrie",\ | ||
"dashmap-writeheavy.txt" using 2:20 with lp ti "dashmap",\ | ||
"flurry-writeheavy.txt" using 2:20 with lp ti "flurry",\ | ||
"papaya-writeheavy.txt" using 2:20 with lp ti "papaya",\ | ||
"scchashmap-writeheavy.txt" using 2:20 with lp ti "scchashmap",\ | ||
"mutex_hashmap-writeheavy.txt" using 2:20 with lp ti "mutexhashmap",\ | ||
"rwlock_hashmap-writeheavy.txt" using 2:20 with lp ti "rwlockhashmap" | ||
|
||
set ylabel "P99 Latency (ns)" | ||
plot [0:17] [0:] \ | ||
"chashmap-writeheavy.txt" using 2:26 with lp ti "chashmap",\ | ||
"contrie-writeheavy.txt" using 2:26 with lp ti "contrie",\ | ||
"dashmap-writeheavy.txt" using 2:26 with lp ti "dashmap",\ | ||
"flurry-writeheavy.txt" using 2:26 with lp ti "flurry",\ | ||
"papaya-writeheavy.txt" using 2:26 with lp ti "papaya",\ | ||
"scchashmap-writeheavy.txt" using 2:26 with lp ti "scchashmap",\ | ||
"mutex_hashmap-writeheavy.txt" using 2:26 with lp ti "mutexhashmap",\ | ||
"rwlock_hashmap-writeheavy.txt" using 2:26 with lp ti "rwlockhashmap" | ||
|
||
set ylabel "P999 Latency (ns)" | ||
plot [0:17] [0:] \ | ||
"chashmap-writeheavy.txt" using 2:28 with lp ti "chashmap",\ | ||
"contrie-writeheavy.txt" using 2:28 with lp ti "contrie",\ | ||
"dashmap-writeheavy.txt" using 2:28 with lp ti "dashmap",\ | ||
"flurry-writeheavy.txt" using 2:28 with lp ti "flurry",\ | ||
"papaya-writeheavy.txt" using 2:28 with lp ti "papaya",\ | ||
"scchashmap-writeheavy.txt" using 2:28 with lp ti "scchashmap",\ | ||
"mutex_hashmap-writeheavy.txt" using 2:28 with lp ti "mutexhashmap",\ | ||
"rwlock_hashmap-writeheavy.txt" using 2:28 with lp ti "rwlockhashmap" | ||
|
||
unset multiplot | ||
set output "latency-readpopular.pdf" | ||
set multiplot layout 1,3 | ||
set ylabel "Average Latency (ns)" | ||
plot [0:17] [0:] \ | ||
"chashmap-readpopular.txt" using 2:20 with lp ti "chashmap",\ | ||
"contrie-readpopular.txt" using 2:20 with lp ti "contrie",\ | ||
"dashmap-readpopular.txt" using 2:20 with lp ti "dashmap",\ | ||
"flurry-readpopular.txt" using 2:20 with lp ti "flurry",\ | ||
"papaya-readpopular.txt" using 2:20 with lp ti "papaya",\ | ||
"scchashmap-readpopular.txt" using 2:20 with lp ti "scchashmap",\ | ||
"mutex_hashmap-readpopular.txt" using 2:20 with lp ti "mutexhashmap",\ | ||
"rwlock_hashmap-readpopular.txt" using 2:20 with lp ti "rwlockhashmap" | ||
|
||
set ylabel "P99 Latency (ns)" | ||
plot [0:17] [0:] \ | ||
"chashmap-readpopular.txt" using 2:26 with lp ti "chashmap",\ | ||
"contrie-readpopular.txt" using 2:26 with lp ti "contrie",\ | ||
"dashmap-readpopular.txt" using 2:26 with lp ti "dashmap",\ | ||
"flurry-readpopular.txt" using 2:26 with lp ti "flurry",\ | ||
"papaya-readpopular.txt" using 2:26 with lp ti "papaya",\ | ||
"scchashmap-readpopular.txt" using 2:26 with lp ti "scchashmap",\ | ||
"mutex_hashmap-readpopular.txt" using 2:26 with lp ti "mutexhashmap",\ | ||
"rwlock_hashmap-readpopular.txt" using 2:26 with lp ti "rwlockhashmap" | ||
|
||
set ylabel "P999 Latency (ns)" | ||
plot [0:17] [0:] \ | ||
"chashmap-readpopular.txt" using 2:28 with lp ti "chashmap",\ | ||
"contrie-readpopular.txt" using 2:28 with lp ti "contrie",\ | ||
"dashmap-readpopular.txt" using 2:28 with lp ti "dashmap",\ | ||
"flurry-readpopular.txt" using 2:28 with lp ti "flurry",\ | ||
"papaya-readpopular.txt" using 2:28 with lp ti "papaya",\ | ||
"scchashmap-readpopular.txt" using 2:28 with lp ti "scchashmap",\ | ||
"mutex_hashmap-readpopular.txt" using 2:28 with lp ti "mutexhashmap",\ | ||
"rwlock_hashmap-readpopular.txt" using 2:28 with lp ti "rwlockhashmap" |
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,23 @@ | ||
#!/bin/bash | ||
|
||
DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
|
||
cargo +stable build --profile release-lto --all-features | ||
|
||
STORE_DIR=$DIR/../../presets/stores | ||
|
||
STORES="chashmap contrie dashmap flurry papaya scchashmap mutex_hashmap rwlock_hashmap" | ||
|
||
for s in $STORES; do | ||
for b in readpopular writeheavy; do | ||
benchmark=$DIR/../$b/$b.toml | ||
echo $s-$b | ||
rm $s-$b.txt 2>/dev/null | ||
for t in `seq 1 16`; do | ||
data="$(env global.latency=true global.threads=$t cargo +stable run --profile release-lto --all-features -- bench -s $STORE_DIR/$s.toml -b $benchmark 2>/dev/null)" | ||
echo "threads $t $data" | tee -a $s-$b.txt | ||
done | ||
done | ||
done | ||
|
||
gnuplot $DIR/plot.gpl |
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