Skip to content
Snippets Groups Projects
Commit 39837503 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

-2cw7: getstat now uses ggplot2 histograms.

parent 885ce8d4
No related branches found
No related tags found
No related merge requests found
#! /usr/bin/env Rscript
args <- commandArgs(TRUE)
datafilename <- args[1]
data <- read.table(datafilename)
attach(data)
datafilename <- args[1]
wcet <- as.integer(args[2])
mydata <- data.frame(val=read.table(datafilename))
attach(mydata)
pdffilename = paste(datafilename,".pdf", sep ="")
pdf(pdffilename)
# require "apt-get install r-cran-ggplot2"
library(ggplot2)
ggplot(data=mydata, aes(x=V1)) +
geom_histogram(fill="lightblue") +
geom_vline(aes(xintercept=vals),
xintercept=wcet,
linetype=2,
size=1,
color="red"
) +
labs(x= "Cycles", y="Cycles counts")
summary(mydata)
print(sprintf("The WCET computed by otawa is %s", wcet))
barplot(table(data))
summary(data)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment