[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r15216: Plot mean request vs mean response times (projects/hidserv/trunk)



Author: sjm217
Date: 2008-06-13 09:06:19 -0400 (Fri, 13 Jun 2008)
New Revision: 15216

Modified:
   projects/hidserv/trunk/plot.R
Log:
Plot mean request vs mean response times

Modified: projects/hidserv/trunk/plot.R
===================================================================
--- projects/hidserv/trunk/plot.R	2008-06-13 12:47:51 UTC (rev 15215)
+++ projects/hidserv/trunk/plot.R	2008-06-13 13:06:19 UTC (rev 15216)
@@ -42,3 +42,20 @@
 h(publtime$publtime, "Service establishment time", "esttime")
 h(reqtimes$reqtime, "Request time", "reqtime")
 h(restimes$restime, "Response time", "restime")
+
+## For each test run, plot mean request time against mean response time
+
+mreqtimes <- tapply(reqtimes$reqtime, reqtimes$testid, mean)
+mrestimes <- tapply(restimes$restime, restimes$testid, mean)
+
+t1 <- data.frame(testid=levels(reqtimes$testid), req=mreqtimes)
+t2 <- data.frame(testid=levels(restimes$testid), res=mrestimes)
+t <- merge(t1,t2)
+
+png(paste("reqres", "png", sep="."), width=800, height=600)
+par(las=1)
+plot(t$req/1e3, t$res/1e3, xlim=c(0.1,150), ylim=c(0.1,150), log="xy",
+     xlab="Mean request time (s)", ylab="Mean response time (s)")
+abline(a=0, b=1, col="lightgrey", lty=2)
+dev.off()
+