update helper-scripts

This commit is contained in:
Alwin Berger 2024-12-03 09:27:28 +01:00
parent 317fbc8e3f
commit 2427ae4703
5 changed files with 42 additions and 20 deletions

View File

@ -0,0 +1,5 @@
#!/bin/sh
export TOPLEVEL="remote/timedump"
[ -d "$TOPLEVEL/feedgeneration100" ] && mv $TOPLEVEL/feedgeneration100 $TOPLEVEL/evolutionary
[ -d "$TOPLEVEL/stg" ] && mv $TOPLEVEL/stg $TOPLEVEL/fret
[ -d "$TOPLEVEL/frafl" ] && mv $TOPLEVEL/frafl $TOPLEVEL/coverage

View File

@ -1,5 +1,6 @@
BDIR=remote
plot () {
[ ! -f ~/code/FRET/LibAFL/fuzzers/FRET/benchmark/remote/${1}${2}_all.png ] && Rscript plot_multi.r remote ${1}${2} ~/code/FRET/LibAFL/fuzzers/FRET/benchmark/remote
[ ! -f ~/code/FRET/LibAFL/fuzzers/FRET/benchmark/$BDIR/${1}${2}_all.png ] && Rscript plot_multi.r $BDIR/timedump ${1}${2} ~/code/FRET/LibAFL/fuzzers/FRET/benchmark/$BDIR
}
# Only bytes
@ -7,9 +8,9 @@ plot () {
export SUFFIX="_seq_bytes"
plot waters $SUFFIX
plot release $SUFFIX
plot copter $SUFFIX
plot interact $SUFFIX
#plot release $SUFFIX
#plot copter $SUFFIX
#plot interact $SUFFIX
# Only interrupts
@ -17,14 +18,16 @@ export SUFFIX="_seq_int"
plot waters $SUFFIX
plot release $SUFFIX
plot copter $SUFFIX
plot interact $SUFFIX
#plot copter $SUFFIX
#plot interact $SUFFIX
# Full
export SUFFIX="_seq_full"
plot waters $SUFFIX
plot release $SUFFIX
#plot release $SUFFIX
plot copter $SUFFIX
plot interact $SUFFIX
#plot interact $SUFFIX
# plot copter "_seq_stateless_full"

View File

@ -14,7 +14,17 @@ perform () {
mv "$(echo $T | cut -d',' -f6 | xargs -I {} basename -s .stgsize {})_nodes.png" $1_nodes.png
}
perform copter
perform release
perform waters
./plot_stgsize_multi.r $(get_largest_files copter) $(get_largest_files release) $(get_largest_files waters)
# perform copter
# perform release
# perform waters
A=$(get_largest_files copter)
B=$(get_largest_files release)
C=$(get_largest_files waters)
A_="$(echo $A | sed 's/copter/UAV w. hid. com./')"
B_="$(echo $B | sed 's/release/Async. rel./')"
C_="$(echo $C | sed 's/waters/Waters ind. ch./')"
echo $A_ $B_ $C_
cp $A "$A_"
cp $B "$B_"
cp $C "$C_"
./plot_stgsize_multi.r "$A_" "$B_" "$C_"

View File

@ -5,7 +5,7 @@ library("doParallel")
#setup parallel backend to use many processors
cores=detectCores()
cl <- makeCluster(cores[1]-1) #not to overload your computer
cl <- makeCluster(cores[1]-4) #not to overload your computer
registerDoParallel(cl)
args = commandArgs(trailingOnly=TRUE)
@ -13,7 +13,7 @@ args = commandArgs(trailingOnly=TRUE)
if (length(args)==0) {
runtype="remote"
#target="waters"
target="watersv2"
target="waters"
#target="waters_int"
#target="watersv2_int"
outputpath="~/code/FRET/LibAFL/fuzzers/FRET/benchmark/"
@ -223,14 +223,14 @@ typenames = typenames[which(!endsWith(typenames, "_max"))]
typenames = selection[which(selection %in% typenames)]
if (length(typenames) == 0) {return()}
h_ = 500
h_ = 380
w_ = h_*4/3
if (SAVE_FILE) {png(file=sprintf("%s/%s_%s.png",outputpath,target,filename), width=w_, height=h_)}
par(mar=c(4,4,1,1))
par(oma=c(0,0,0,0))
plot(c(0,max(one_frame['time'])),c(ylow,yhigh), col='white', xlab="Time [h]", ylab="WORT [insn]", pch='.')
plot(c(0,max(one_frame['time'])),c(ylow,yhigh), col='white', xlab="Time [h]", ylab="WCRT estimate [insn]", pch='.')
for (t in seq_len(length(typenames))) {
#proj = one_frame[seq(1, dim(one_frame)[1], by=max(1, length(one_frame[[1]])/(10*w_))),]
@ -300,7 +300,11 @@ legend(LEGEND_POS, legend=leglines,#"bottomright",
col=c(MY_COLORS_[1:length(typenames)],"black"),
lty=c(rep("solid",length(typenames)),"dotted"))
if (SAVE_FILE) {dev.off()}
if (SAVE_FILE) {
dev.new()
par(las = 2, mar = c(10, 5, 1, 1))
dev.off()
}
}
stopCluster(cl)

View File

@ -11,15 +11,15 @@ plot_multiple_files <- function(file_paths) {
data['V5'] <- data['V5']/(3600*1000)
# Extract the name for the line
target <- sub("_.*", "", basename(file_path))
data$target <- target
application <- sub("_.*", "", basename(file_path))
data$application <- application
# Combine data
all_data <- rbind(all_data, data)
}
# Plot the line chart
p <- ggplot(all_data, aes(x = V5, y = V2, color = target)) +
p <- ggplot(all_data, aes(x = V5, y = V2, color = application)) +
geom_line() +
labs(x = "runtime [h]", y = "# of nodes") +
theme_minimal()