Skip to content

Commit 64568e0

Browse files
label sample size
1 parent 34e2289 commit 64568e0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/benchmark.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ type WorkPrecisionSet
135135
names
136136
sample_error
137137
error_estimate
138+
numruns
138139
end
139140

140141
function WorkPrecision(prob,alg,abstols,reltols,dts=nothing;
@@ -221,7 +222,7 @@ function WorkPrecisionSet(prob::AbstractODEProblem,abstols,reltols,setups;numrun
221222
name=names[i],kwargs...,setups[i]...)
222223
end
223224
end
224-
return WorkPrecisionSet(wps,N,abstols,reltols,prob,setups,names,nothing,error_estimate)
225+
return WorkPrecisionSet(wps,N,abstols,reltols,prob,setups,names,nothing,error_estimate,numruns)
225226
end
226227

227228
@def error_calculation begin
@@ -353,7 +354,7 @@ function WorkPrecisionSet(prob::AbstractRODEProblem,abstols,reltols,setups,test_
353354
end
354355

355356
wps = [WorkPrecision(prob,abstols,reltols,errors[i],times[:,i],names[i],N) for i in 1:N]
356-
WorkPrecisionSet(wps,N,abstols,reltols,prob,setups,names,sample_error,error_estimate)
357+
WorkPrecisionSet(wps,N,abstols,reltols,prob,setups,names,sample_error,error_estimate,numruns_error)
357358
end
358359

359360
@def sample_errors begin

src/plotrecipes.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ end
5050
if plot_sample_error
5151
@series begin
5252
linestyle := :dash
53-
label := "Sample Error"
53+
label := "Sample Error: $(wp_set.numruns)"
5454
color := :red
5555
xs = [wp_set.sample_error,wp_set.sample_error]
5656
ys = [minimum(minimum(t) for t in times),maximum(maximum(t) for t in times)]
5757
xs,ys
5858
end
59-
label --> reshape(["Sample Error";wp_set.names],1,1+length(wp_set))
59+
label --> reshape(["Sample Error: $(wp_set.numruns)";wp_set.names],1,1+length(wp_set))
6060
else
6161
label --> reshape(wp_set.names,1,length(wp_set))
6262
end

0 commit comments

Comments
 (0)