Skip to content

Instantly share code, notes, and snippets.

@ajalt
Created September 8, 2016 21:00
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajalt/31c4a45001bea4438f313c899fa961a8 to your computer and use it in GitHub Desktop.
Save ajalt/31c4a45001bea4438f313c899fa961a8 to your computer and use it in GitHub Desktop.
library(reshape)
library(ggplot2)
id = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
# Clean build, no Gradle daemon
java_clean_nodaemon = c(24.831, 26.247, 24.109, 23.338, 24.567, 25.349, 23.388, 24.930, 22.830, 25.635)
kotlin_clean_nodaemon = c(30.936, 33.065, 35.062, 31.953, 31.666, 33.907, 31.047, 31.104, 32.922, 32.150)
# Clean build, Gradle daemon running
java_clean_daemon = c(23.397, 17.704, 15.289, 14.328, 13.971, 14.698, 13.784, 13.886, 13.946, 14.201)
kotlin_clean_daemon = c(31.330, 21.193, 17.369, 16.822, 19.796, 16.445, 15.630, 15.973, 15.313, 15.429)
# Incremental build, no file changes
java_incremental_nochanges = c(7.116, 4.790, 4.736, 4.815, 4.517, 4.633, 4.565, 4.423, 4.465, 4.589)
kotlin_incremental_nochanges = c(12.020, 4.942, 4.638, 4.714, 4.524, 4.556, 4.482, 4.599, 4.516, 4.424)
# Incremental build, with changed file, no dependencies
java_incremental_changes = c(7.957, 7.675, 7.163, 7.090, 7.167, 6.972, 6.790, 7.215, 6.936, 6.715)
kotlin_incremental_changes = c(9.657, 6.947, 6.330, 6.580, 6.211, 6.312, 6.209, 6.096, 5.887, 5.732)
# Incremental build, with changed file, many dependencies
java_incremental_largechanges = c(8.647, 8.015, 7.475, 7.286, 7.074, 7.884, 6.769, 6.912, 6.885, 6.880)
kotlin_incremental_largechanges = c(9.457, 6.294, 6.346, 6.017, 5.804, 6.154, 6.567, 5.838, 5.968, 5.872)
clean_nodaemon = data.frame(id=id, Java=java_clean_nodaemon, Kotlin=kotlin_clean_nodaemon)
clean_daemon = data.frame(id=id, Java=java_clean_daemon, Kotlin=kotlin_clean_daemon)
incremental_nochanges = data.frame(id=id, Java=java_incremental_nochanges, Kotlin=kotlin_incremental_nochanges)
incremental_changes = data.frame(id=id, Java=java_incremental_changes, Kotlin=kotlin_incremental_changes)
incremental_largechanges = data.frame(id=id, Java=java_incremental_largechanges, Kotlin=kotlin_incremental_largechanges)
barplot <- function(df, title) {
ggplot(melt(df, id="id"), aes(x=id, y=value, fill=variable)) +
geom_bar(position="dodge", stat="identity") + labs(y="Seconds", fill="") +
theme(axis.title.x=element_blank(),
axis.text.x=element_blank(),
axis.ticks.x=element_blank())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment