pytest-codspeed 4.0.0b0__tar.gz → 4.0.0b1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {pytest_codspeed-4.0.0b0/src/pytest_codspeed.egg-info → pytest_codspeed-4.0.0b1}/PKG-INFO +1 -1
  2. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/pyproject.toml +1 -1
  3. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/__init__.py +2 -2
  4. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/walltime.py +11 -2
  5. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1/src/pytest_codspeed.egg-info}/PKG-INFO +1 -1
  6. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/LICENSE +0 -0
  7. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/README.md +0 -0
  8. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/setup.cfg +0 -0
  9. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/setup.py +0 -0
  10. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/config.py +0 -0
  11. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/__init__.py +0 -0
  12. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/hooks/__init__.py +0 -0
  13. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/hooks/build.py +0 -0
  14. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/hooks/dist_instrument_hooks.pyi +0 -0
  15. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/hooks/instrument-hooks/dist/core.c +0 -0
  16. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/callgrind.h +0 -0
  17. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/core.h +0 -0
  18. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/valgrind.h +0 -0
  19. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/hooks/instrument-hooks/includes/zig.h +0 -0
  20. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/instruments/valgrind.py +0 -0
  21. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/plugin.py +0 -0
  22. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/py.typed +0 -0
  23. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed/utils.py +0 -0
  24. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed.egg-info/SOURCES.txt +0 -0
  25. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed.egg-info/dependency_links.txt +0 -0
  26. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed.egg-info/entry_points.txt +0 -0
  27. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed.egg-info/requires.txt +0 -0
  28. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/src/pytest_codspeed.egg-info/top_level.txt +0 -0
  29. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/tests/test_pytest_plugin.py +0 -0
  30. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/tests/test_pytest_plugin_cpu_instrumentation.py +0 -0
  31. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/tests/test_pytest_plugin_walltime.py +0 -0
  32. {pytest_codspeed-4.0.0b0 → pytest_codspeed-4.0.0b1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-codspeed
3
- Version: 4.0.0b0
3
+ Version: 4.0.0b1
4
4
  Summary: Pytest plugin to create CodSpeed benchmarks
5
5
  Author-email: Arthur Pastel <arthur@codspeed.io>
6
6
  License: The MIT License (MIT)
@@ -66,7 +66,7 @@ version = { attr = "pytest_codspeed.__version__" }
66
66
 
67
67
 
68
68
  [tool.bumpver]
69
- current_version = "4.0.0-beta"
69
+ current_version = "4.0.0-beta1"
70
70
  version_pattern = "MAJOR.MINOR.PATCH[-TAG[NUM]]"
71
71
  commit_message = "Release v{new_version} 🚀"
72
72
  tag_message = "Release v{new_version} 🚀"
@@ -1,6 +1,6 @@
1
- __version__ = "4.0.0b0"
1
+ __version__ = "4.0.0b1"
2
2
  # We also have the semver version since __version__ is not semver compliant
3
- __semver_version__ = "4.0.0-beta"
3
+ __semver_version__ = "4.0.0-beta1"
4
4
 
5
5
  from .plugin import BenchmarkFixture
6
6
 
@@ -224,6 +224,8 @@ class WallTimeInstrument(Instrument):
224
224
  # Benchmark
225
225
  iter_range = range(iter_per_round)
226
226
  run_start = perf_counter_ns()
227
+ if self.instrument_hooks:
228
+ self.instrument_hooks.start_benchmark()
227
229
  for _ in range(rounds):
228
230
  start = perf_counter_ns()
229
231
  for _ in iter_range:
@@ -234,6 +236,9 @@ class WallTimeInstrument(Instrument):
234
236
  if end - run_start > benchmark_config.max_time_ns:
235
237
  # TODO: log something
236
238
  break
239
+ if self.instrument_hooks:
240
+ self.instrument_hooks.stop_benchmark()
241
+ self.instrument_hooks.set_executed_benchmark(uri)
237
242
  benchmark_end = perf_counter_ns()
238
243
  total_time = (benchmark_end - run_start) / 1e9
239
244
 
@@ -250,7 +255,7 @@ class WallTimeInstrument(Instrument):
250
255
  )
251
256
  return out
252
257
 
253
- def measure_pedantic(
258
+ def measure_pedantic( # noqa: C901
254
259
  self,
255
260
  marker_options: BenchmarkMarkerOptions,
256
261
  pedantic_options: PedanticOptions[T],
@@ -277,6 +282,8 @@ class WallTimeInstrument(Instrument):
277
282
  # Benchmark
278
283
  times_per_round_ns: list[float] = []
279
284
  benchmark_start = perf_counter_ns()
285
+ if self.instrument_hooks:
286
+ self.instrument_hooks.start_benchmark()
280
287
  for _ in range(pedantic_options.rounds):
281
288
  start = perf_counter_ns()
282
289
  args, kwargs = pedantic_options.setup_and_get_args_kwargs()
@@ -286,7 +293,9 @@ class WallTimeInstrument(Instrument):
286
293
  times_per_round_ns.append(end - start)
287
294
  if pedantic_options.teardown is not None:
288
295
  pedantic_options.teardown(*args, **kwargs)
289
-
296
+ if self.instrument_hooks:
297
+ self.instrument_hooks.stop_benchmark()
298
+ self.instrument_hooks.set_executed_benchmark(uri)
290
299
  benchmark_end = perf_counter_ns()
291
300
  total_time = (benchmark_end - benchmark_start) / 1e9
292
301
  stats = BenchmarkStats.from_list(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-codspeed
3
- Version: 4.0.0b0
3
+ Version: 4.0.0b1
4
4
  Summary: Pytest plugin to create CodSpeed benchmarks
5
5
  Author-email: Arthur Pastel <arthur@codspeed.io>
6
6
  License: The MIT License (MIT)