Skip to content

Commit

Permalink
chore: rename func in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Feb 22, 2023
1 parent fcfc969 commit 4d86ced
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions benchmarks/_evented.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Foo(BaseModel): # type: ignore [no-redef]
"""


def time_attribute_access(num: int = 100_000, repeat: int = 20) -> None:
def attribute_access(num: int = 100_000, repeat: int = 20) -> None:
statement = "obj.e = (2, 'bye')"
for type_ in DCLASSES:
Foo = _get_dataclass(type_, False)
Expand All @@ -94,6 +94,3 @@ def time_attribute_access(num: int = 100_000, repeat: int = 20) -> None:
print(f"{type_} (no events): {wo_events:.3f} µs")
print(f"{type_} (with events): {w_events:.3f} µs")
print(f"{type_} (with events): {w_events / wo_events:.3f}x slower")


time_attribute_access()

0 comments on commit 4d86ced

Please sign in to comment.