Skip to content

Instantly share code, notes, and snippets.

@shepmaster
Created March 21, 2019 19:21
Show Gist options
  • Save shepmaster/c16bbae77d777778a47a0424fc326b42 to your computer and use it in GitHub Desktop.
Save shepmaster/c16bbae77d777778a47a0424fc326b42 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -eu
sed \
-e '/rustc/d' \
-e '/result/d' \
-e '/running/d' \
-e '/^$/d' \
-e 's/test bench_//' \
-e 's/... bench://' \
-e 's@ns/iter.*@@' \
-e 's/,//' \
-e 's/ */, /g' \
| awk '/^1.*/ { vers = $0; next } { print $0 vers }'
require(ggplot2)
times = read.csv('/tmp/raw-data.csv', header = F, col.names = c("Test", "Time", "Version"))
plt = ggplot(times, aes(x = Version, y = Time, colour = Test))
pretty = plt + scale_y_continuous(limits = c(0, max(times$Time) * 1.1)) + geom_boxplot() + labs(y = "Time (ns)")
ggsave('/tmp/graph.png', width = 16, height = 9, dpi = 144)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment