mirror of
https://github.com/clearlinux/cloud-native-setup.git
synced 2026-09-03 04:11:38 +00:00
metrics: parallel: take into account 'stepping'
Now the data has the ability to 'step' (that is, increment the pod count by >1 between samples), use that n_pod value for the x-axis, rather than a +1 count, so the x-axis makes a lot more sense. Signed-off-by: Graham Whaley <graham.whaley@intel.com>
This commit is contained in:
committed by
David Lyle
parent
aeb6ebbab7
commit
b3f40569b2
@@ -27,7 +27,6 @@ cstats_names=c()
|
||||
skip_points=0 # Should we draw the points as well as lines on the graphs.
|
||||
|
||||
for (currentdir in resultdirs) {
|
||||
count=1
|
||||
dirstats=c()
|
||||
for (testname in testnames) {
|
||||
matchdir=paste(inputdir, currentdir, sep="")
|
||||
@@ -57,6 +56,7 @@ for (currentdir in resultdirs) {
|
||||
# convert ms to seconds
|
||||
cdata=data.frame(boot_time=as.numeric(fdata$BootResults$launch_time$Result)/1000)
|
||||
cdata=cbind(cdata, delete_time=as.numeric(fdata$BootResults$delete_time$Result)/1000)
|
||||
cdata=cbind(cdata, npod=as.numeric(fdata$BootResults$n_pods$Result))
|
||||
|
||||
# If we have more than 20 items to draw, then do not draw the points on
|
||||
# the graphs, as they are then too noisy to read.
|
||||
@@ -64,22 +64,19 @@ for (currentdir in resultdirs) {
|
||||
skip_points=1
|
||||
}
|
||||
|
||||
cdata=cbind(cdata, count=seq_len(length(cdata[, "boot_time"])))
|
||||
cdata=cbind(cdata, testname=rep(testname, length(cdata[, "boot_time"]) ))
|
||||
cdata=cbind(cdata, dataset=rep(datasetname, length(cdata[, "boot_time"]) ))
|
||||
|
||||
# Store away as a single set
|
||||
data=rbind(data, cdata)
|
||||
|
||||
count = count + 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Show how boot time changed
|
||||
boot_line_plot <- ggplot() +
|
||||
geom_line( data=data, aes(count, boot_time, colour=testname, group=dataset), alpha=0.2) +
|
||||
geom_smooth( data=data, aes(count, boot_time, colour=testname, group=dataset), se=FALSE, method="loess", size=0.3) +
|
||||
geom_line( data=data, aes(npod, boot_time, colour=testname, group=dataset), alpha=0.2) +
|
||||
geom_smooth( data=data, aes(npod, boot_time, colour=testname, group=dataset), se=FALSE, method="loess", size=0.3) +
|
||||
xlab("parallel pods") +
|
||||
ylab("Boot time (s)") +
|
||||
ggtitle("Pod boot time (detail)") +
|
||||
@@ -87,7 +84,7 @@ boot_line_plot <- ggplot() +
|
||||
theme(axis.text.x=element_text(angle=90))
|
||||
|
||||
if ( skip_points == 0 ) {
|
||||
boot_line_plot = boot_line_plot + geom_point( data=data, aes(count, boot_time, colour=testname, group=dataset), alpha=0.3)
|
||||
boot_line_plot = boot_line_plot + geom_point( data=data, aes(npod, boot_time, colour=testname, group=dataset), alpha=0.3)
|
||||
}
|
||||
|
||||
# And get a zero Y index plot.
|
||||
@@ -96,8 +93,8 @@ if ( skip_points == 0 ) {
|
||||
|
||||
# Show how boot time changed
|
||||
delete_line_plot <- ggplot() +
|
||||
geom_line( data=data, aes(count, delete_time, colour=testname, group=dataset), alpha=0.2) +
|
||||
geom_smooth( data=data, aes(count, delete_time, colour=testname, group=dataset), se=FALSE, method="loess", size=0.3) +
|
||||
geom_line( data=data, aes(npod, delete_time, colour=testname, group=dataset), alpha=0.2) +
|
||||
geom_smooth( data=data, aes(npod, delete_time, colour=testname, group=dataset), se=FALSE, method="loess", size=0.3) +
|
||||
xlab("parallel pods") +
|
||||
ylab("Delete time (s)") +
|
||||
ggtitle("Pod deletion time (detail)") +
|
||||
@@ -105,7 +102,7 @@ delete_line_plot <- ggplot() +
|
||||
theme(axis.text.x=element_text(angle=90))
|
||||
|
||||
if ( skip_points == 0 ) {
|
||||
delete_line_plot = delete_line_plot + geom_point( data=data, aes(count, delete_time, colour=testname, group=dataset), alpha=0.3)
|
||||
delete_line_plot = delete_line_plot + geom_point( data=data, aes(npod, delete_time, colour=testname, group=dataset), alpha=0.3)
|
||||
}
|
||||
|
||||
# And get a 0 indexed Y axis plot
|
||||
|
||||
Reference in New Issue
Block a user