From 1985276cddd978c1ad6f8eae42683713289c71ad Mon Sep 17 00:00:00 2001 From: Dom Owens <56118457+Dom-Owens-UoB@users.noreply.github.com> Date: Tue, 5 Apr 2022 15:10:36 +0100 Subject: [PATCH] Delete perf directory deleted as BenchmarkLite is obsolete, will be replaced --- perf/perf.jl | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 perf/perf.jl diff --git a/perf/perf.jl b/perf/perf.jl deleted file mode 100644 index 7039362..0000000 --- a/perf/perf.jl +++ /dev/null @@ -1,28 +0,0 @@ -using Changepoints -using BenchmarkLite - -mutable struct CP_Benchmark <: Proc - alg::Function - name::String -end - -Base.string(proc::CP_Benchmark) = proc.name -Base.length(proc::CP_Benchmark, cfg) = 2 -Base.isvalid(proc::CP_Benchmark, cfg) = true#isa(cfg, (Int,Int)) && all(cfg .> 0) && length(cfg)==2 -function Base.start(proc::CP_Benchmark, cfg) - n, λ = cfg - data, cps = @changepoint_sampler n λ Normal(Normal(0.0, 5.0), 1.0) - return NormalMeanSegment(data, 1.0) -end - -function Base.run(proc::CP_Benchmark, cfg, s) - n, λ = cfg - proc.alg(s, n) -end - -Base.done(proc::CP_Benchmark, cfg, s) = nothing - -cp_procs = Proc[CP_Benchmark(BS, "BinSeg"), CP_Benchmark(PELT, "PELT")] -cfgs = [(1000, 200), (1000, 100), (1000, 50)] -results = run(cp_procs, cfgs) -show(results)