clean-up and updates
[p2p-testing-infrastructure.git] / ControlScripts / parse_mon_log / r_parse_udp.R
1 args <- commandArgs(trailingOnly=TRUE)
2
3 source_file <- args[1]
4 output_file <- args[2]
5
6 udp_table <- read.table(source_file, header=T)
7
8 bytes_array <- udp_table$bytes
9 offset_bytes_array <- bytes_array[2:length(bytes_array)]
10
11 speed <- (offset_bytes_array - bytes_array[1:length(bytes_array)-1]) / 1024
12
13 pdf(file=output_file)
14 plot(speed, type="o", col="red", xlab="Time (s)", ylab="Speed (KB/s)");
15 dev.off()