File tree Expand file tree Collapse file tree 4 files changed +33
-4
lines changed Expand file tree Collapse file tree 4 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 1+
2+ TyperCommand TyperCommand
3+ BaseCommand TyperCommand (rich) --help (rich)
4+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5+ modules 550 592 745 746
6+ time 0.16 0.17 0.24 0.22
7+ imports 0.10 0.12 0.16 0.17
8+
Original file line number Diff line number Diff line change 1+
2+ polls
3+ polls polls --help shell
4+ polls --help polls shell (typer (typer completion
5+ (tutorial) (tutorial) (typer) completi… w/rich) w/rich) (rich)
6+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7+ modules 573 551 615 606 768 747 755
8+ time 0.15 0.15 0.17 0.20 0.24 0.22 0.27
9+ imports 0.11 0.10 0.12 0.12 0.16 0.15 0.15
10+
Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ improvements <https://github.com/django-commons/django-typer/issues/170>`_ are m
3737
3838.. only :: latex
3939
40- .. image :: _static/img/minimal_profile.svg
41- :width: 80%
40+ .. literalinclude :: _static/img/minimal_profile.txt
4241
4342The second benchmark shows the same stats for the :ref: `polls example code <building_commands >`.
4443These benchmarks compare the :class: `~django.core.management.BaseCommand ` native implementation
@@ -54,5 +53,4 @@ using :pypi:`django-typer` is minimal. On the order of a few 10s of milliseconds
5453
5554.. only :: latex
5655
57- .. image :: _static/img/polls_profile.svg
58- :width: 80%
56+ .. literalinclude :: _static/img/polls_profile.txt
Original file line number Diff line number Diff line change @@ -420,6 +420,13 @@ def minimal_table():
420420 Path (__file__ ).parent .parent / "doc/source/_static/img/minimal_profile.svg"
421421 ).write_text (svg , encoding = "utf-8" )
422422
423+ console .print (table )
424+
425+ svg = console .export_text () # export as a string
426+ (
427+ Path (__file__ ).parent .parent / "doc/source/_static/img/minimal_profile.txt"
428+ ).write_text (svg , encoding = "utf-8" )
429+
423430 def polls_table ():
424431 console = Console (record = True , width = 100 )
425432
@@ -532,6 +539,12 @@ def polls_table():
532539 Path (__file__ ).parent .parent / "doc/source/_static/img/polls_profile.svg"
533540 ).write_text (svg , encoding = "utf-8" )
534541
542+ console .print (table )
543+ svg = console .export_text () # export as a string
544+ (
545+ Path (__file__ ).parent .parent / "doc/source/_static/img/polls_profile.txt"
546+ ).write_text (svg , encoding = "utf-8" )
547+
535548 minimal_table ()
536549 polls_table ()
537550
You can’t perform that action at this time.
0 commit comments