You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2020/08/07 01:32:18 UTC
[kudu] 02/03: [scripts] alternative y-label in jobs_runtime.R
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit f3c7b3f866d3f1f6505264e27b035e8d2798c2d1
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Tue Aug 4 19:06:44 2020 -0700
[scripts] alternative y-label in jobs_runtime.R
Added alternative y-label for graphs generated by jobs_runtime.R.
I'm planning to use this in a follow-up changelist.
Change-Id: I8f53c39348a61b8d54f22cfd9adaac20006f898a
Reviewed-on: http://gerrit.cloudera.org:8080/16289
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
src/kudu/scripts/jobs_runtime.R | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/kudu/scripts/jobs_runtime.R b/src/kudu/scripts/jobs_runtime.R
index e6dc97e..365d1d2 100644
--- a/src/kudu/scripts/jobs_runtime.R
+++ b/src/kudu/scripts/jobs_runtime.R
@@ -32,17 +32,25 @@ newpng <- function(filename = "img.png", width = 1500, height = 500) {
}
args <- commandArgs(trailingOnly = TRUE)
-if (length(args) < 2) {
- stop("usage: jobs_runtime.R <filename> <testname>")
+if (length(args) < 2 || length(args) > 3) {
+ stop("usage: jobs_runtime.R <filename> <testname> [y-axis-label]")
}
filename = args[1]
testname = args[2]
+ylabel="runtime"
+if (length(args) == 3) {
+ ylabel=args[3]
+}
newpng(paste(testname, "-jobs-runtime.png", sep = ""))
d <- read.table(file=filename, header=T)
print(ggplot(d, aes(x = build_number, y = runtime, color = workload)) +
+ ylab(ylabel) +
stat_summary(aes(group = workload), fun.y=median, geom = "line") +
- geom_boxplot(aes(group = interaction(workload, build_number)), position = "identity", outlier.size = 1.7, outlier.colour = "gray32") +
+ geom_boxplot(aes(group = interaction(workload, build_number)),
+ position = "identity",
+ outlier.size = 1.7,
+ outlier.colour = "gray32") +
ggtitle(testname))