Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ringsaturn committed Dec 29, 2023
1 parent 9adae1e commit a618363
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "tzfpy"
version = "0.15.2"
version = "0.15.3"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,25 @@ conda install -c conda-forge tzfpy
## Performance

Benchmark runs under
[`v0.15.0`](https://github.com/ringsaturn/tzfpy/releases/tag/v0.15.0) on my
MacBook Pro with 2.3 GHz 8-Core Intel Core i9.
[`v0.15.3`](https://github.com/ringsaturn/tzfpy/releases/tag/v0.15.3) on my
MacBook Pro with Apple M3 Max.

```bash
pytest tests/test_bench.py
```

```
-------------------------------------------------- benchmark: 1 tests --------------------------------------------------
Name (time in us) Min Max Mean StdDev Median IQR Outliers OPS (Kops/s) Rounds Iterations
------------------------------------------------------------------------------------------------------------------------
test_tzfpy_random_cities 1.4783 34.8846 3.6341 1.9382 3.2185 2.1708 4384;754 275.1715 20000 10
------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------ benchmark: 1 tests ------------------------------------------------------------
Name (time in ns) Min Max Mean StdDev Median IQR Outliers OPS (Kops/s) Rounds Iterations
--------------------------------------------------------------------------------------------------------------------------------------------
test_tzfpy_random_cities 837.4918 11,183.2982 1,973.3456 833.9543 1,820.9103 1,066.7020 6422;511 506.7536 20000 10
--------------------------------------------------------------------------------------------------------------------------------------------
Legend:
Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
OPS: Operations Per Second, computed as 1 / Mean
Results (1.10s):
1 passed
Results (1.95s):
4 passed
```

Or you can view more benchmark results on
Expand Down
4 changes: 0 additions & 4 deletions tzfpy.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,24 @@
"""
from typing import List


def get_tz(lng: float, lat: float) -> str:
"""Get timezonename for location.
It will return the first positive match.
"""
...


def get_tzs(lng: float, lat: float) -> List[str]:
"""Get timezonenames for location.
It will iter all polygon and return all positive match.
"""
...


def timezonenames() -> List[str]:
"""Show all support timezone names."""
...


def data_version() -> str:
"""Show current tzdata version"""
...

0 comments on commit a618363

Please sign in to comment.