update scripts

This commit is contained in:
Alwin Berger 2025-05-28 11:48:39 +00:00
parent 27811aaaca
commit fabf746c4c
4 changed files with 51 additions and 20 deletions

View File

@ -13,3 +13,4 @@ bins
*.sqlite
eval*
test_*
bench_*

View File

@ -116,15 +116,15 @@ ml2lines <- function(ml, casename) {
return(lines)
}
BREW=RdYlGn(8)
# BREW=Spectral(4)
# BREW=RdYlGn(8)
BREW=Spectral(8)
# MY_COLORS <- c(BREW[[4]], BREW[[3]], BREW[[2]], BREW[[1]], "cyan", "pink", "gray", "orange", "black", "yellow","brown")
MY_COLORS=BREW
# draw limit
max_x <- 12
min_y <- -2800
min_y <- -2500
max_y <- 2500
LEGEND_POS = "bottomright"
@ -223,7 +223,7 @@ for (i in seq_len(length(casenames[['casename']]))) {
legend(LEGEND_POS, legend=legend_names,#"bottomright",
col=legend_colors,
lty=legend_styles,
lwd=2)
lwd=2, ncol=2)
par(las = 2, mar = c(10, 5, 1, 1))

View File

@ -155,17 +155,10 @@ draw_plot <- function(data, casename) {
max_y <- max(max_y, static_wcrt)
# plot setup
h_ = 300
w_ = h_*4/3
# pdf(file=sprintf("%s/sql_%s.pdf", args[2],casename), width=w_/72, height=h_/72) # Modify this line to use tikzDevice
# pdf(file=sprintf("%s/sql_%s_wide.pdf", args[2],casename), width=w_*2/72, height=h_/72) # Modify this line to use tikzDevice
png(file=sprintf("%s/sql_%s.png", args[2],casename), width=w_, height=h_) # Modify this line to use tikzDevice
# png(file=sprintf("%s/sql_%s_wide.png", args[2],casename), width=w_*2, height=h_) # Modify this line to use tikzDevice
# tikz(file=sprintf("%s/sql_%s.tex", args[2],casename), width=w_/72, height=h_/72) # Modify this line to use tikzDevice
# tikz(file=sprintf("%s/sql_%s_wide.tex", args[2],casename), width=(w_*2)/72, height=h_/72) # Modify this line to use tikzDevice
par(mar=c(4,4,1,1))
par(oma=c(0,0,0,0))
plot(c(0,max_x),c(min_y,max_y), col='white', xlab="Time [h]", ylab="WCRT estimate [µs]", pch='.')
plot(c(0,max_x),c(min_y,max_y), col='white', xlab="Time [h]", ylab="WORT [µs]", pch='.')
# plot data
for (n in seq_len(length(data))) {
@ -183,7 +176,8 @@ draw_plot <- function(data, casename) {
legend_styles <- c(rep("solid",length(data)),"dotted","dashed")
if (wcrt > 0) {
abline(h=wcrt, col='grey', lty='dotted', lwd=3)
# abline(h=wcrt, col='grey', lty='dotted', lwd=3)
abline(h=max(wcrt,max(sapply(data, function(tbl) max(tbl$max, na.rm = TRUE)))), col='grey', lty='dotted', lwd=3) # If the manual WCRT was slightly too low
legend_names <- c(legend_names, "WCRT")
}
if (static_wcrt > 0) {
@ -191,13 +185,12 @@ draw_plot <- function(data, casename) {
legend_names <- c(legend_names, "static bound")
}
legend(LEGEND_POS, legend=legend_names,#"bottomright",
col=legend_colors,
lty=legend_styles,
lwd=2)
# legend(LEGEND_POS, legend=legend_names,#"bottomright",
# col=legend_colors,
# lty=legend_styles,
# lwd=2)
par(las = 2, mar = c(10, 5, 1, 1))
dev.off()
}
print(casenames[['casename']])
@ -210,6 +203,33 @@ for (cn in casenames[['casename']]) {
table_data <- dbGetQuery(con, sprintf("SELECT * FROM '%s'", table_name))
table_list[[tool_name]] <- table_data
}
h_ = 300
w_ = h_*4/3
# png
## normal
png(file=sprintf("%s/sql_%s.png", args[2],cn[[1]]), width=w_, height=h_)
draw_plot(table_list, cn[[1]])
dev.off()
## wide
png(file=sprintf("%s/sql_%s_wide.png", args[2],cn[[1]]), width=2*w_, height=h_)
draw_plot(table_list, cn[[1]])
dev.off()
# tikz
## normal
tikz(file=sprintf("%s/sql_%s.tex", args[2],cn[[1]]), width=0.6*w_/72, height=0.6*h_/72)
draw_plot(table_list, cn[[1]])
dev.off()
## wide
tikz(file=sprintf("%s/sql_%s_wide.tex", args[2],cn[[1]]), width=(w_*2)/72, height=h_/72)
draw_plot(table_list, cn[[1]])
dev.off()
# pdf
## normal
pdf(file=sprintf("%s/sql_%s.pdf", args[2],cn[[1]]), width=w_/72, height=h_/72)
draw_plot(table_list, cn[[1]])
dev.off()
## wide
pdf(file=sprintf("%s/sql_%s_wide.pdf", args[2],cn[[1]]), width=2*w_/72, height=h_/72)
draw_plot(table_list, cn[[1]])
}

View File

@ -47,4 +47,14 @@ polycopter_seq_dataflow_bytes,main_osek,FUZZ_INPUT,4096,trigger_Qemu_break,FC,
watersc14_par_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C14,0#1000
watersc14_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C14,0#1000
waters_seq_unsync_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C13,0#1000
watersgen1_par_bytes,main_waters,FUZZ_INPUT,40960,trigger_Qemu_break,T_24,0#10000;1#10000;2#10000;3#10000
watersgen1_par_bytes,main_waters,FUZZ_INPUT,40960,trigger_Qemu_break,T_24,0#10000;1#10000;2#10000;3#10000
watersIc11_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C11,0#1000
watersIc12_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C12,0#1000
watersIc13_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C13,0#1000
watersIc14_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C14,0#1000
watersIc21_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C21,0#1000
watersc22_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C22,0#1000
watersIc23_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C23,0#1000
watersIc31_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C31,0#1000
watersIc32_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C32,0#1000
watersIc33_seq_full,main_waters,FUZZ_INPUT,4096,trigger_Qemu_break,C33,0#1000
1 kernel main_function input_symbol input_size return_function select_task interrupts
47 watersc14_par_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C14 0#1000
48 watersc14_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C14 0#1000
49 waters_seq_unsync_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C13 0#1000
50 watersgen1_par_bytes main_waters FUZZ_INPUT 40960 trigger_Qemu_break T_24 0#10000;1#10000;2#10000;3#10000
51 watersIc11_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C11 0#1000
52 watersIc12_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C12 0#1000
53 watersIc13_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C13 0#1000
54 watersIc14_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C14 0#1000
55 watersIc21_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C21 0#1000
56 watersc22_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C22 0#1000
57 watersIc23_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C23 0#1000
58 watersIc31_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C31 0#1000
59 watersIc32_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C32 0#1000
60 watersIc33_seq_full main_waters FUZZ_INPUT 4096 trigger_Qemu_break C33 0#1000