299 | | |
| 299 | * The visualization script contains a "R" script to generate pdf/jpg based on the sqlite3 measurement database file generated by the OMLified application. The script is provided below. |
| 300 | |
| 301 | {{{ |
| 302 | library(RSQLite) |
| 303 | con <- dbConnect(dbDriver("SQLite"), dbname = "gec14-test6.sq3") |
| 304 | dbListTables(con) |
| 305 | dbReadTable(con,"iperf_transfer") |
| 306 | mydata <- dbGetQuery(con, "select begin_interval,size,end_interval from iperf_transfer") |
| 307 | intervals <- mydata$end_interval - mydata$begin_interval |
| 308 | throughput <- mydata$size/intervals/1024/1024*8 |
| 309 | pdf("gec14-test6.pdf") |
| 310 | plot(throughput,type="o",col="red",xlab="Experiment Interval",ylab="Throughput (Mbps)") |
| 311 | title(main="Iperf_Experiment", col.main="blue", font.main=4) |
| 312 | dev.off() |
| 313 | }}} |