Skip to content

Commit 751c2ea

Browse files
Add grouping and adjust name of benchmark, to better reflect what it is actually doing.
1 parent 0e8fd5d commit 751c2ea

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

benchmarks/benchmark.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
from pathlib import Path
55
from textwrap import dedent
66

7+
import pytest
8+
79
from ruff_cgx import format_cgx_content, lint_cgx_content
810
from ruff_cgx.linter import lint_file
911

@@ -292,6 +294,7 @@ def handle_footer_click(self):
292294
).strip()
293295

294296

297+
@pytest.mark.benchmark(group="format")
295298
class TestFormatBenchmarks:
296299
"""Benchmarks for format operations."""
297300

@@ -316,6 +319,7 @@ def test_format_very_complex_cgx(self, benchmark):
316319
assert result is not None
317320

318321

322+
@pytest.mark.benchmark(group="lint")
319323
class TestLintBenchmarks:
320324
"""Benchmarks for lint operations."""
321325

@@ -340,11 +344,12 @@ def test_lint_very_complex_cgx(self, benchmark):
340344
assert isinstance(result, list)
341345

342346

347+
@pytest.mark.benchmark(group="lint+fix")
343348
class TestLintFileBenchmarks:
344349
"""Benchmarks for lint file operations with fix."""
345350

346-
def test_lint_file_with_fix_cli(self, benchmark):
347-
"""Benchmark linting and fixing a file (CLI usage with full output)."""
351+
def test_lint_file_with_fix(self, benchmark):
352+
"""Benchmark linting and fixing a file."""
348353

349354
def setup():
350355
# Create temp file

0 commit comments

Comments
 (0)