From bec0d46b7a2b4ab6a3a3f38fa365caf25b3cc116 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Sun, 26 Nov 2023 16:56:07 +0100 Subject: [PATCH] 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)