Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.38 KB | None | 0 0
  1. library(plotly)
  2. library(ggplot2)
  3.  
  4. plot1 <- function(data, title) {
  5. ggplot(data = data, aes(x = Threading, y = Score, fill = Score)) + geom_bar(stat = "identity", color = "black") + geom_label(aes(label = Score, y = mean(Score) * 0.05 + Score, fill = Score), position = "identity", color = "white", fontface = "bold") + scale_fill_gradientn(colours = c("#ff9999", "#33cc33")) + labs(title = title, x = "Threading Mode", y = "Cinebench R15 Score", fill = "Score") + theme_bw()
  6. }
  7.  
  8. plot2 <- function(data, title) {
  9. ggplot(data = data, aes(x = Threading, y = ScoreScale, fill = ScoreScale)) + geom_bar(stat = "identity", color = "black") + geom_label(aes(label = round(ScoreScale, digits = 2), y = mean(ScoreScale) * 0.05 + ScoreScale, fill = ScoreScale), position = "identity", color = "white", fontface = "bold") + scale_fill_gradientn(colours = c("#ff9999", "#33cc33")) + labs(title = title, x = "Threading Mode", y = "Scaled Cinebench R15 Score (GHz)", fill = "Scale") + theme_bw()
  10. }
  11.  
  12.  
  13. data <- data.frame(Threading = as.factor(paste0(c("[1] Single x", "[2] Multi Physical x", "[3] Multi Logical x", "[4] Multi Overcommit x"), c(1, 2, 4, 8))),
  14. Score = c(121, 197, 260, 257))
  15. data$ScoreScale <- data$Score / c(3.3, rep(2 * 2.7, 3))
  16. plot1(data, "i7-4600U (2c/4t, 3.3/2.7 GHz) Cinebench R15 (Baremetal)")
  17. plot2(data, "i7-4600U (2c/4t, 3.3/2.7 GHz) Cinebench R15 (Baremetal)")
  18.  
  19. data <- data.frame(Threading = as.factor(paste0(c("[1] Single x", "[2] Multi Physical x", "[3] Multi Logical x", "[4] Multi Overcommit x"), c(1, 6, 12, 24))),
  20. Score = c(116, 613, 816, 786))
  21. data$ScoreScale <- data$Score / c(3.9, rep(6 * 3.5, 3))
  22. plot1(data, "i7-3930K (6c/12t, 3.9/3.5 GHz) Cinebench R15 (VMware)")
  23. plot2(data, "i7-3930K (6c/12t, 3.9/3.5 GHz) Cinebench R15 (VMware)")
  24.  
  25. data <- data.frame(Threading = as.factor(paste0(c("[1] Single x", "[2] Multi Physical x", "[3] Multi Logical x", "[4] Multi Overcommit x"), c(1, 20, 40, 80))),
  26. Score = c(111, 1777, 2270, 2114))
  27. data$ScoreScale <- data$Score / c(3.1, rep(20 * 2.7, 3))
  28. plot1(data, "Dual Quanta Freedom (2x 10c/20t, 3.1/2.7 GHz) Cinebench R15 (KVM)")
  29. plot2(data, "Dual Quanta Freedom (2x 10c/20t, 3.1/2.7 GHz) Cinebench R15 (KVM)")
  30.  
  31. data <- data.frame(Threading = as.factor(rep(c("[1] Single", "[2] Multi Physical", "[3] Multi Logical", "[4] Multi Overcommit"), 3)),
  32. Threads = c(1, 2, 4, 8, 1, 6, 12, 24, 1, 20, 40, 80),
  33. Score = c(121, 197, 260, 257, 116, 613, 816, 786, 111, 1777, 2270, 2114),
  34. Machine = c(rep("Small (i7-4600U, 2c/4t, 3.3/2.7 GHz, Baremetal)", 4), rep("Medium (i7-3930K, 6c/12t, 3.9/3.5 GHz, VMware)", 4), rep("Large (Dual Quanta Freedom, 2x 10c/20t, 3.1/2.7 GHz, KVM)", 4)))
  35. data$ScoreScale <- data$Score / c(c(3.3, rep(2 * 2.7, 3)), c(3.9, rep(6 * 3.5, 3)), c(3.1, rep(20 * 2.7, 3)))
  36. data$Penalty <- data$ScoreScale / c(rep(data$ScoreScale[1], 4), rep(data$ScoreScale[5], 4), rep(data$ScoreScale[9], 4))
  37. ggplot(data = data, aes(x = Machine, y = Score, fill = Score)) + geom_bar(stat = "identity", color = "black") + geom_label(aes(label = Score, y = Score, fill = Score), position = "identity", color = "white", fontface = "bold") + scale_fill_gradientn(colours = c("#ff9999", "#33cc33")) + labs(title = "All benchmarks (Cinebench R15)", x = "Threading Mode", y = "Cinebench R15 Score", fill = "Score") + facet_grid(Threading ~ ., scales = "free") + theme_bw()
  38. ggplot(data = data, aes(x = Machine, y = ScoreScale, fill = ScoreScale)) + geom_bar(stat = "identity", color = "black") + geom_label(aes(label = round(ScoreScale, digits = 2), y = ScoreScale, fill = ScoreScale), position = "identity", color = "white", fontface = "bold") + scale_fill_gradientn(colours = c("#ff9999", "#33cc33")) + labs(title = "All Scaled benchmarks (Cinebench R15)", x = "Threading Mode", y = "Scaled Cinebench R15 Score (GHz)", fill = "Scale") + facet_grid(Threading ~ ., scales = "free") + theme_bw()
  39. ggplot(data = data, aes(x = Machine, y = Penalty, fill = Penalty)) + geom_bar(stat = "identity", color = "black") + geom_label(aes(label = round(Penalty, digits = 2), y = Penalty, fill = Penalty), position = "identity", color = "white", fontface = "bold") + scale_fill_gradientn(colours = c("#ff9999", "#33cc33")) + labs(title = "All Single Thread Scaled benchmarks (Cinebench R15)", x = "Threading Mode", y = "Scaled Cinebench R15 Score (1 thread)", fill = "Scale") + facet_grid(Threading ~ ., scales = "free") + theme_bw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement