Skip to content

Commit

Permalink
(test,eval perf) enable sql log to all benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesfize committed Mar 27, 2024
1 parent 0872b9c commit f177ad7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion backend/geonature/tests/benchmarks/test_benchmark_gn_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from geonature.tests.test_pr_occhab import stations

from .benchmark_generator import BenchmarkTest, CLater
from .utils import activate_profiling_sql

logging.basicConfig()
logger = logging.getLogger("logger-name")
Expand All @@ -13,7 +14,7 @@


@pytest.mark.benchmark(group="gn_meta")
@pytest.mark.usefixtures("client_class", "temporary_transaction")
@pytest.mark.usefixtures("client_class", "temporary_transaction", "activate_profiling_sql")
class TestBenchmarkGnMeta:

test_list_acquisition_frameworks = BenchmarkTest(
Expand Down
3 changes: 2 additions & 1 deletion backend/geonature/tests/benchmarks/test_benchmark_occhab.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from geonature.tests.test_pr_occhab import stations

from .benchmark_generator import BenchmarkTest, CLater
from .utils import activate_profiling_sql

logging.basicConfig()
logger = logging.getLogger("logger-name")
Expand All @@ -13,7 +14,7 @@


@pytest.mark.benchmark(group="occhab")
@pytest.mark.usefixtures("client_class", "temporary_transaction")
@pytest.mark.usefixtures("client_class", "temporary_transaction", "activate_profiling_sql")
class TestBenchmarkOcchab:

test_get_station = BenchmarkTest(
Expand Down
4 changes: 3 additions & 1 deletion backend/geonature/tests/benchmarks/test_benchmark_occtax.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

from .benchmark_generator import BenchmarkTest, CLater

from .utils import activate_profiling_sql

logging.basicConfig()
logger = logging.getLogger("logger-name")
logger.setLevel(logging.DEBUG)
Expand All @@ -13,7 +15,7 @@


@pytest.mark.benchmark(group="occtax")
@pytest.mark.usefixtures("client_class", "temporary_transaction")
@pytest.mark.usefixtures("client_class", "temporary_transaction", "activate_profiling_sql")
class TestBenchmarkOcctax:

test_list_releves_restricted = BenchmarkTest(
Expand Down
6 changes: 2 additions & 4 deletions backend/geonature/tests/benchmarks/test_benchmark_synthese.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from geonature.tests.benchmarks import *
from geonature.tests.test_pr_occhab import stations
from geonature.core.gn_synthese.models import Synthese
from .utils import activate_profiling_sql

from .benchmark_generator import BenchmarkTest, CLater

Expand All @@ -21,10 +22,7 @@


@pytest.mark.benchmark(group="synthese")
@pytest.mark.usefixtures(
"client_class",
"temporary_transaction",
) # , "activate_profiling_sql")
@pytest.mark.usefixtures("client_class", "temporary_transaction", "activate_profiling_sql")
class TestBenchmarkSynthese:
# GET NOMENCLATURE
test_get_default_nomenclatures = BenchmarkTest(
Expand Down

0 comments on commit f177ad7

Please sign in to comment.