Skip to content

Commit

Permalink
Remove ascii-graph dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
joerick committed Sep 7, 2023
1 parent 02efadf commit 053ef63
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ repos:
- flaky
- numpy
- nox
- ascii_graph
- requests
- greenlet
- types-click
Expand Down
14 changes: 9 additions & 5 deletions metrics/overhead.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ def test_func_template():
# ('pyinstrument timeline', min(pyinstrument_timeline_timings)),
)

from ascii_graph import Pyasciigraph

graph = Pyasciigraph(float_format="{0:.3f}")
for line in graph.graph("Profiler overhead", graph_data):
print(line)
GRAPH_WIDTH = 60
print("Profiler overhead")
print("–" * (GRAPH_WIDTH + 17))
max_time = max([t[1] for t in graph_data])
for name, time in graph_data:
chars = int((time / max_time) * GRAPH_WIDTH)
spaces = GRAPH_WIDTH - chars
print(f'{name:15} {"█" * chars}{" " * spaces} {time:.3f}s')
print()
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"examples": [
"numpy",
"django",
"ascii_graph @ https://github.com/nyurik/py-ascii-graph/archive/refs/heads/fix-python310.zip",
],
"types": [
"typing_extensions",
Expand Down

0 comments on commit 053ef63

Please sign in to comment.