ConfigFiles: add scenario for testing two containers on the same host
authorRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Thu, 5 Aug 2010 14:47:09 +0000 (17:47 +0300)
committerRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Thu, 5 Aug 2010 14:47:09 +0000 (17:47 +0300)
ConfigFiles/scenario-rd2.r [new file with mode: 0644]
ConfigFiles/scenario-rd2.txt [new file with mode: 0644]

diff --git a/ConfigFiles/scenario-rd2.r b/ConfigFiles/scenario-rd2.r
new file mode 100644 (file)
index 0000000..9905fa2
--- /dev/null
@@ -0,0 +1,66 @@
+#
+# Copyright: George Milescu 2010 - george.milescu@gmail.com
+#
+# R script used to plot the results of a scenario
+
+# import ggplot2
+library(ggplot2)
+
+# Read transmitted command line arguments
+args <- commandArgs(trailingOnly = TRUE)
+
+# The data files are located in the target folder. Also, the graph will be saved in the target folder.
+target_folder <- args[2]
+campaign_name <- args[3]
+rm(args)
+
+# read data from the data file
+seeder=read.table(paste(target_folder, "p2p-next-06-101.log.data", sep="/"), header=T, sep=" ")
+leecher=read.table(paste(target_folder, "p2p-next-06-102.log.data", sep="/"), header=T, sep=" ")
+
+
+# transform KB/s to Mbit/s
+leecher$dlspeed <- leecher$dlspeed*8/1000
+
+
+# plot dlspeed-percent data
+p <- ggplot() + 
+geom_point(aes(x=leecher$percent, y=leecher$dlspeed, label="Leecher"), size=1) +
+theme_bw() +
+scale_x_continuous("Percent", limits=c(0, 100), breaks=seq(0, 100, 10)) +
+scale_y_continuous("Download speed (Mbit/s)", limits=c(0, 8), breaks=seq(0, 8, 0.5)) +
+coord_cartesian() +
+scale_colour_manual("Legend") +
+opts(title=paste(campaign_name, "Scenario-rd: a test swarm (1 Seeder, 1 Leecher), all peers have an 8 Mbit/s BW", sep="\n"))
+
+# plot data as an eps file
+postscript(paste(target_folder, "scenario-rd-dlspeed-percent.eps", sep="/"))
+print(p)
+dev.off()
+
+# plot data as an png file
+png(paste(target_folder, "scenario-rd-dlspeed-percent.png", sep="/"), width = 1280, height = 800)
+print(p)
+dev.off()
+
+
+
+# plot dlspeed-time data
+p <- ggplot() + 
+geom_point(aes(x=leecher$time, y=leecher$dlspeed, label="Leecher"), size=1) +
+theme_bw() +
+scale_x_continuous("Time(s)") +
+scale_y_continuous("Download speed (Mbit/s)", limits=c(0, 8), breaks=seq(0, 8, 0.5)) +
+coord_cartesian() +
+scale_colour_manual("Legend") +
+opts(title=paste(campaign_name, "Scenario-rd: a test swarm (1 Seeder, 1 Leecher), all peers have an 8 Mbit/s BW", sep="\n"))
+
+# plot data as an eps file
+postscript(paste(target_folder, "scenario-rd-dlspeed-time.eps", sep="/"))
+print(p)
+dev.off()
+
+# plot data as an png file
+png(paste(target_folder, "scenario-rd-dlspeed-time.png", sep="/"), width = 1280, height = 800)
+print(p)
+dev.off()
diff --git a/ConfigFiles/scenario-rd2.txt b/ConfigFiles/scenario-rd2.txt
new file mode 100644 (file)
index 0000000..37c640d
--- /dev/null
@@ -0,0 +1,10 @@
+# Scenario01ct
+# Description:
+#   * a flashcrowd swarm
+#   * 1 seeder
+#   * 89 leechers
+#   * all peers have the same bandwidth
+#
+# Hostname                     SSHport         User    RemoteFolder            NetInterface    Download(Mbps)  DownloadBurst(K)        Upload(Mbps)    UploadBurst(K)          TcScript        ClientType              TorrentFile             Periods
+p2p-next-06.grid.pub.ro                10122           p2p     /home/p2p/george        eth0            8               100                     8               100                     bw_limit_ct.sh  hrktorrent_seeder       Data.100M.ct.torrent    (10,60) (60,100) (120,200) (200,230) (250,600)
+p2p-next-06.grid.pub.ro                10222           p2p     /home/p2p/george        eth0            8               100                     8               100                     bw_limit_ct.sh  hrktorrent_leecher      Data.100M.ct.torrent    (10,30) (40,70) (80,110) (130,160) (180,250) (300,600)