From de5c16e6010095fca0e36ecac892c0394fd0bddd Mon Sep 17 00:00:00 2001 From: Alwin Berger Date: Thu, 23 May 2024 10:16:28 +0200 Subject: [PATCH] plot micro fixes --- fuzzers/FRET/benchmark/plot_multi.r | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fuzzers/FRET/benchmark/plot_multi.r b/fuzzers/FRET/benchmark/plot_multi.r index 58377dd24a..2ca1a84ca4 100644 --- a/fuzzers/FRET/benchmark/plot_multi.r +++ b/fuzzers/FRET/benchmark/plot_multi.r @@ -11,7 +11,7 @@ registerDoParallel(cl) args = commandArgs(trailingOnly=TRUE) if (length(args)==0) { - runtype="timedump_253048_1873f6_all/timedump" + runtype="remote" target="waters_int" outputpath="~/code/FRET/LibAFL/fuzzers/FRET/benchmark/" #MY_SELECTION <- c('state', 'afl', 'graph', 'random') @@ -23,7 +23,7 @@ if (length(args)==0) { MY_SELECTION <- args[4:length(args)] SAVE_FILE=TRUE } -worst_cases <- list(waters=0, waters_int=0, tmr=405669, micro_longint=0) +worst_cases <- list(waters=0, waters_int=0, tmr=405669, micro_longint=0, gen3=0) worst_case <- worst_cases[[target]] if (is.null(worst_case)) { worst_case = 0 @@ -33,12 +33,12 @@ if (is.null(worst_case)) { MY_COLORS <- c("green", "blue", "red", "magenta", "orange", "cyan", "pink", "gray", "orange", "black", "yellow","brown") BENCHDIR=sprintf("~/code/FRET/LibAFL/fuzzers/FRET/benchmark/%s",runtype) BASENAMES=Filter(function(x) x!="" && substr(x,1,1)!='.',list.dirs(BENCHDIR,full.names=FALSE)) -PATTERNS="%s.[0-9]*$" +PATTERNS="%s#[0-9]*.time$" #RIBBON='sd' #RIBBON='span' RIBBON='both' DRAW_WC = worst_case > 0 -LEGEND_POS="topright" +LEGEND_POS="bottomright" #LEGEND_POS="bottomright" CONTINUE_LINE_TO_END=FALSE @@ -222,7 +222,7 @@ if (SAVE_FILE) {png(file=sprintf("%s%s_%s.png",outputpath,target,filename), widt par(mar=c(4,4,1,1)) par(oma=c(0,0,0,0)) -plot(c(1,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="WORT [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_))),] @@ -288,7 +288,7 @@ if (DRAW_WC) { lines(c(0,length(one_frame[[1]])),y=c(worst_case,worst_case), lty='dotted') leglines=c(typenames, 'worst observed') } -legend(LEGEND_POS, legend=leglines,#"topleft" +legend(LEGEND_POS, legend=leglines,#"bottomright", col=c(MY_COLORS_[1:length(typenames)],"black"), lty=c(rep("solid",length(typenames)),"dotted")) @@ -301,7 +301,7 @@ par(oma=c(0,0,0,0)) #RIBBON='both' #MY_SELECTION = c('state_int','generation100_int') -#MY_SELECTION = c('state_int','frafl_int') +#MY_SELECTION = c('state','frafl') if (exists("MY_SELECTION")) { plotting(MY_SELECTION, 'custom', MY_COLORS[c(1,2)])