From: Razvan Deaconescu Date: Mon, 28 Feb 2011 18:10:12 +0000 (+0200) Subject: Utils-eurocon: add R parser script X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=b5483a7d4e58f6f3da6c104be4ced7ef147351b1;p=p2p-testing-infrastructure.git Utils-eurocon: add R parser script --- diff --git a/Utils/test-socket-signal/test/process/parse_timespan.R b/Utils/test-socket-signal/test/process/parse_timespan.R new file mode 100644 index 0000000..438fd22 --- /dev/null +++ b/Utils/test-socket-signal/test/process/parse_timespan.R @@ -0,0 +1,23 @@ +# +# get mean download time, standard deviation and mean download speed +# + +args <- commandArgs(trailingOnly = TRUE) + +input_file <- args[2] + +data <- read.table(input_file, sep=" ") + +index <- unique(data[1]) +l <- as.list(index[,]) +for (i in l) { + print(i) + data_subset <- data[data$V1 %in% i,] + values <- data_subset[2] + m <- mean(values) + s <- sd(values) + p <- s / m * 100 + print(m) + print(s) + print(p) +}