From bec0d46b7a2b4ab6a3a3f38fa365caf25b3cc116 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Sun, 26 Nov 2023 16:56:07 +0100 Subject: [PATCH 1/2] update benchmark code for newer root --- bench/test_cost.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bench/test_cost.py b/bench/test_cost.py index c9f82b65..682ac0ed 100644 --- a/bench/test_cost.py +++ b/bench/test_cost.py @@ -213,7 +213,8 @@ def run(): @pytest.mark.parametrize("n", N) @pytest.mark.parametrize("BatchMode", [False, True]) @pytest.mark.parametrize("NumCPU", [0, nb.get_num_threads()]) -def test_RooFit(benchmark, n, BatchMode, NumCPU): +@pytest.mark.parametrize("EvalBackend", ["legacy", "cpu"]) +def test_RooFit(benchmark, n, BatchMode, NumCPU, EvalBackend): import ROOT as R x = R.RooRealVar("x", "x", 0, 1) @@ -232,7 +233,11 @@ def run(): sigma.setVal(0.1) slope.setVal(1) z.setVal(0.5) - args = [R.RooFit.PrintLevel(-1), R.RooFit.BatchMode(BatchMode)] + args = [ + R.RooFit.PrintLevel(-1), + R.RooFit.BatchMode(BatchMode), + R.RooFit.EvalBackend(EvalBackend), + ] if NumCPU: args.append(R.RooFit.NumCPU(NumCPU)) pdf.fitTo(data, *args) From 379f2b4dbb032052d5467fb71aa91c4e2a0282f1 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Sun, 26 Nov 2023 16:58:20 +0100 Subject: [PATCH 2/2] ignore svg in bench folder --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f1b916b5..8229cb75 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ __pycache__ pip-wheel-metadata +bench/*.svg + .benchmarks .DS_Store .idea