From e910e52781402a7c49262aeb13937b43da83863b Mon Sep 17 00:00:00 2001 From: Colton Myers Date: Thu, 11 May 2023 10:13:02 -0600 Subject: [PATCH] More cleanup + fix pyperf version --- benchmarks/bm_exceptions.py | 3 +-- benchmarks/bm_transactions.py | 12 ++---------- requirements.txt | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/benchmarks/bm_exceptions.py b/benchmarks/bm_exceptions.py index 7925a79..385d832 100644 --- a/benchmarks/bm_exceptions.py +++ b/benchmarks/bm_exceptions.py @@ -1,4 +1,3 @@ -import elasticapm from benchmarks.decorators import with_elasticapm_client @@ -7,4 +6,4 @@ def bench_capture_exception(client): try: assert False except AssertionError: - id = client.capture_exception() + client.capture_exception() diff --git a/benchmarks/bm_transactions.py b/benchmarks/bm_transactions.py index b8074b9..9655119 100644 --- a/benchmarks/bm_transactions.py +++ b/benchmarks/bm_transactions.py @@ -1,10 +1,6 @@ -import elasticapm -from benchmarks.decorators import with_elasticapm_client +from elasticapm import capture_span -try: - from elasticapm import capture_span -except ImportError: - from elasticapm import trace as capture_span +from benchmarks.decorators import with_elasticapm_client @with_elasticapm_client() @@ -25,7 +21,3 @@ def bench_transaction_spans(client): with capture_span("test3"): pass client.end_transaction("test", "OK") - - -def bench_init(): - client = elasticapm.Client() diff --git a/requirements.txt b/requirements.txt index 7f5d35d..c1bcd4a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ click==8.1.3 elastic-transport==8.4.0 elasticsearch==8.3.0 psutil==5.9.5 -pyperf==2.6.0 +pyperf==2.3.1 python-dateutil==2.8.2 urllib3==1.26.15 wrapt==1.15.0