File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed
Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ install:
44 pip install -e .
55
66bench : install-dev-rs-release
7- python benchmarks/bench.py
7+ python -m benchmarks.bench
8+
9+ bench-optimize : install-dev-rs-release
10+ python -m benchmarks.optimize
811
912install-dev-rs-release :
1013 cd sqlglotrs/ && python -m maturin develop -r
Original file line number Diff line number Diff line change @@ -533,6 +533,10 @@ make check # Full test suite & linter checks
533533| long | 0.00889 (1.0) | 0.00572 (0.643) | 0.36982 (41.56) | 0.00614 (0.690) | 0.02530 (2.844) | 0.02931 (3.294) | 0.00059 (0.066) |
534534| crazy | 0.02918 (1.0) | 0.01991 (0.682) | 1.88695 (64.66) | 0.02003 (0.686) | 7.46894 (255.9) | 0.64994 (22.27) | 0.00327 (0.112) |
535535
536+ ```
537+ make bench # Run parsing benchmark
538+ make bench-optimize # Run optimization benchmark
539+ ```
536540
537541## Optional Dependencies
538542
Original file line number Diff line number Diff line change 11import collections .abc
22
3- from helpers import ascii_table
3+ from benchmarks . helpers import ascii_table
44
55# moz_sql_parser 3.10 compatibility
66collections .Iterable = collections .abc .Iterable
Original file line number Diff line number Diff line change 1+ import sys
12import typing as t
23from argparse import ArgumentParser
34
4- from helpers import ascii_table
5+ from benchmarks . helpers import ascii_table
56from sqlglot .optimizer import optimize
67from sqlglot import parse_one
78from tests .helpers import load_sql_fixture_pairs , TPCH_SCHEMA , TPCDS_SCHEMA
89from timeit import Timer
9- import sys
1010
1111# Deeply nested conditions currently require a lot of recursion
1212sys .setrecursionlimit (10000 )
You can’t perform that action at this time.
0 commit comments