js/src/devtools/plot-octane.R
author Nika Layzell <nika@thelayzells.com>
Wed, 16 Sep 2020 20:47:55 +0000
changeset 549331 ab7d302fd3186b10ada9264528c80f6840e44571
parent 313570 eab4e2f9adb418a65995058aa97cec5547454118
permissions -rwxr-xr-x
Bug 1659696 - Check PendingInitialization before targeting in window.open, r=kmag This requires adding the flag as a synced field on the BrowsingContext, and checking it in a few more places. Attempts to open a new window in this racy manner will now raise an exception. This should avoid the issue from bug 1658854 by blocking the buggy attempts to load before the nested event loop has been exited. Differential Revision: https://phabricator.services.mozilla.com/D87927

#!/usr/bin/env Rscript

# Usage:
#
#     octane.R control.csv variable.csv
#
# Output will be placed in Rplots.pdf
#
# Remember: on Octane, higher is better!

library(ggplot2)

args <- commandArgs(trailingOnly = TRUE)

# Reading in data.
control <- read.table(args[1], sep=",", header=TRUE)
variable <- read.table(args[2], sep=",", header=TRUE)

# Pulling out columns that we want to plot.
# Not totally necessary.
ctrl <- control$Score..version.9.
var <- variable$Score..version.9.

# Concatenating the values we want to plot.
score <- c(ctrl, var)
# Creating a vector of labels for the data points.
label <- c(rep("control", length(ctrl)), rep("variable", length(var)))

# Creating a data frame of the score and label.
data <- data.frame(label, score)

# Now plotting!
ggplot(data, aes(label, score, color=label, pch=label)) +
  # Adding boxplot without the outliers.
  geom_boxplot(outlier.shape=NA) +
  # Adding jitter plot on top of the boxplot. If you want to spread the points
  # more, increase jitter.
  geom_jitter(position=position_jitter(width=0.05))