From 4fffa3d4eabaecc35b73b7d32f20525bffd8ab70 Mon Sep 17 00:00:00 2001 From: Erik Wrede Date: Tue, 21 May 2024 12:14:53 +0200 Subject: [PATCH] chore: add parsing only benchmarks --- .../benchmarks/test_parsing_validation.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test_parser/benchmarks/test_parsing_validation.py b/test_parser/benchmarks/test_parsing_validation.py index f862626..a056d7b 100644 --- a/test_parser/benchmarks/test_parsing_validation.py +++ b/test_parser/benchmarks/test_parsing_validation.py @@ -30,3 +30,20 @@ def test_validation_gitlab_query_rustberry_no_mirror(): document = compiler.parse(operation) validation_success = compiler.validate(document) query = compiler.gql_core_ast(document) + + +@pytest.mark.benchmark +def test_parsing_gitlab_query_graphql_core(): + query = parse(operation) + +@pytest.mark.benchmark +def test_parsing_gitlab_query_rustberry(): + document = compiler.parse(operation) + query = compiler.gql_core_ast_mirror(document) +@pytest.mark.benchmark +def test_parsing_gitlab_query_rustberry_no_mirror(): + document = compiler.parse(operation) + query = compiler.gql_core_ast(document) + + +