mirror of https://github.com/Textualize/rich.git
commit
65cb9bfb77
|
@ -7,4 +7,4 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- run: python3 -m pip install codespell
|
||||
- run: codespell --ignore-words-list="ba,fo,hel,revered,womens"
|
||||
--skip="./README.de.md,./README.es.md,./README.sv.md,./README.fr.md,./README.de-ch.md,./README.hi.md,./README.pt-br.md,./README.it.md,*.svg"
|
||||
--skip="./README.de.md,./README.es.md,./README.sv.md,./README.fr.md,./README.de-ch.md,./README.hi.md,./README.pt-br.md,./README.it.md,*.svg,./benchmarks/snippets.py"
|
||||
|
|
|
@ -113,3 +113,7 @@ venv.bak/
|
|||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
|
||||
# airspeed velocity
|
||||
benchmarks/env/
|
||||
benchmarks/html/
|
||||
|
|
|
@ -34,8 +34,10 @@ repos:
|
|||
rev: 22.1.0
|
||||
hooks:
|
||||
- id: black
|
||||
exclude: ^benchmarks/
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.10.1
|
||||
hooks:
|
||||
- id: isort
|
||||
exclude: ^benchmarks/
|
||||
args: ["--profile", "black"]
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"version": 1,
|
||||
"project": "rich",
|
||||
"project_url": "https://github.com/Textualize/rich",
|
||||
"repo": ".",
|
||||
"repo_subdir": "",
|
||||
"install_command": [
|
||||
"in-dir={env_dir} python -mpip install {wheel_file}"
|
||||
],
|
||||
"uninstall_command": [
|
||||
"return-code=any python -mpip uninstall -y {project}"
|
||||
],
|
||||
"build_command": [
|
||||
"pip install poetry",
|
||||
"python setup.py build",
|
||||
"PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}"
|
||||
],
|
||||
"branches": [
|
||||
"master"
|
||||
],
|
||||
"html_dir": "./benchmarks/html",
|
||||
"results_dir": "./benchmarks/results",
|
||||
"env_dir": "./benchmarks/env",
|
||||
"dvcs": "git",
|
||||
"environment_type": "virtualenv",
|
||||
"install_timeout": 180,
|
||||
"show_commit_url": "http://github.com/Textualize/rich/commit/",
|
||||
"pythons": [
|
||||
"3.10"
|
||||
],
|
||||
"matrix": {
|
||||
"req": {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
# Benchmarking Rich
|
||||
|
||||
This directory contains benchmarks, for monitoring the performance of Rich over time.
|
||||
|
||||
The benchmarks use a tool called [Airspeed Velocity](https://asv.readthedocs.io/en/stable) (`asv`),
|
||||
and we've configured it in [asv.conf.json](../asv.conf.json).
|
||||
|
||||
## Running Benchmarks
|
||||
|
||||
We strongly recommend running `asv run --help` for a full list of options, but
|
||||
here are some common actions:
|
||||
|
||||
* You can run the benchmarks against the `master` branch with `asv run`.
|
||||
* To test the most recent commit on your branch `asv run HEAD^!`.
|
||||
* To generate a static website for browsing the results, run `asv publish`. The resulting HTML can be found in `benchmarks/html`.
|
||||
|
||||
The asv docs have some more examples [here](https://asv.readthedocs.io/en/stable/using.html#benchmarking).
|
|
@ -0,0 +1,193 @@
|
|||
from io import StringIO
|
||||
|
||||
from benchmarks import snippets
|
||||
from rich.color import Color, ColorSystem
|
||||
from rich.console import Console
|
||||
from rich.pretty import Pretty
|
||||
from rich.style import Style
|
||||
from rich.syntax import Syntax
|
||||
from rich.table import Table
|
||||
from rich.text import Text
|
||||
|
||||
|
||||
class TextSuite:
|
||||
def setup(self):
|
||||
self.console = Console(
|
||||
file=StringIO(), color_system="truecolor", legacy_windows=False
|
||||
)
|
||||
self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)
|
||||
|
||||
def time_wrapping(self):
|
||||
Text(snippets.LOREM_IPSUM).wrap(self.console, 12, overflow="fold")
|
||||
|
||||
def time_indent_guides(self):
|
||||
Text(snippets.PYTHON_SNIPPET).with_indent_guides()
|
||||
|
||||
def time_fit(self):
|
||||
Text(snippets.LOREM_IPSUM).fit(12)
|
||||
|
||||
def time_split(self):
|
||||
Text(snippets.LOREM_IPSUM).split()
|
||||
|
||||
def time_divide(self):
|
||||
Text(snippets.LOREM_IPSUM).divide(range(20, 100, 4))
|
||||
|
||||
def time_align_center(self):
|
||||
Text(snippets.LOREM_IPSUM).align("center", width=self.len_lorem_ipsum * 3)
|
||||
|
||||
def time_render(self):
|
||||
Text(snippets.LOREM_IPSUM).render(self.console)
|
||||
|
||||
def time_wrapping_unicode_heavy(self):
|
||||
Text(snippets.UNICODE_HEAVY_TEXT).wrap(self.console, 12, overflow="fold")
|
||||
|
||||
def time_fit_unicode_heavy(self):
|
||||
Text(snippets.UNICODE_HEAVY_TEXT).fit(12)
|
||||
|
||||
def time_split_unicode_heavy(self):
|
||||
Text(snippets.UNICODE_HEAVY_TEXT).split()
|
||||
|
||||
def time_divide_unicode_heavy(self):
|
||||
Text(snippets.UNICODE_HEAVY_TEXT).divide(range(20, 100, 4))
|
||||
|
||||
def time_align_center_unicode_heavy(self):
|
||||
Text(snippets.UNICODE_HEAVY_TEXT).align(
|
||||
"center", width=self.len_lorem_ipsum * 3
|
||||
)
|
||||
|
||||
def time_render_unicode_heavy(self):
|
||||
Text(snippets.UNICODE_HEAVY_TEXT).render(self.console)
|
||||
|
||||
|
||||
class SyntaxWrappingSuite:
|
||||
def setup(self):
|
||||
self.console = Console(
|
||||
file=StringIO(), color_system="truecolor", legacy_windows=False
|
||||
)
|
||||
self.syntax = Syntax(
|
||||
code=snippets.PYTHON_SNIPPET, lexer="python", word_wrap=True
|
||||
)
|
||||
|
||||
def time_text_thin_terminal_heavy_wrapping(self):
|
||||
self._print_with_width(20)
|
||||
|
||||
def time_text_thin_terminal_medium_wrapping(self):
|
||||
self._print_with_width(60)
|
||||
|
||||
def time_text_wide_terminal_no_wrapping(self):
|
||||
self._print_with_width(100)
|
||||
|
||||
def _print_with_width(self, width):
|
||||
self.console.print(self.syntax, width)
|
||||
|
||||
|
||||
class TableSuite:
|
||||
def time_table_no_wrapping(self):
|
||||
self._print_table(width=100)
|
||||
|
||||
def time_table_heavy_wrapping(self):
|
||||
self._print_table(width=30)
|
||||
|
||||
def _print_table(self, width):
|
||||
table = Table(title="Star Wars Movies")
|
||||
console = Console(
|
||||
file=StringIO(), color_system="truecolor", legacy_windows=False, width=width
|
||||
)
|
||||
table.add_column("Released", justify="right", style="cyan", no_wrap=True)
|
||||
table.add_column("Title", style="magenta")
|
||||
table.add_column("Box Office", justify="right", style="green")
|
||||
table.add_row(
|
||||
"Dec 20, 2019", "[b]Star Wars[/]: The Rise of Skywalker", "$952,110,690"
|
||||
)
|
||||
table.add_row(
|
||||
"May 25, 2018", "Solo: A [red][b]Star Wars[/] Story[/]", "$393,151,347"
|
||||
)
|
||||
table.add_row(
|
||||
"Dec 15, 2017",
|
||||
"[b red]Star Wars[/] Ep. V111: The Last Jedi",
|
||||
"$1,332,539,889",
|
||||
)
|
||||
table.add_row(
|
||||
"Dec 16, 2016", "Rogue One: A [blue]Star Wars[/] Story", "$1,332,439,889"
|
||||
)
|
||||
console.print(table)
|
||||
|
||||
|
||||
class PrettySuite:
|
||||
def setup(self):
|
||||
self.console = Console(
|
||||
file=StringIO(), color_system="truecolor", legacy_windows=False, width=100
|
||||
)
|
||||
|
||||
def time_pretty(self):
|
||||
pretty = Pretty(snippets.PYTHON_DICT)
|
||||
self.console.print(pretty)
|
||||
|
||||
def time_pretty_indent_guides(self):
|
||||
pretty = Pretty(snippets.PYTHON_DICT, indent_guides=True)
|
||||
self.console.print(pretty)
|
||||
|
||||
def time_pretty_justify_center(self):
|
||||
pretty = Pretty(snippets.PYTHON_DICT, justify="center")
|
||||
self.console.print(pretty)
|
||||
|
||||
|
||||
class StyleSuite:
|
||||
def setup(self):
|
||||
self.console = Console(
|
||||
file=StringIO(), color_system="truecolor", legacy_windows=False, width=100
|
||||
)
|
||||
|
||||
def time_parse_ansi(self):
|
||||
Style.parse("red on blue")
|
||||
|
||||
def time_parse_hex(self):
|
||||
Style.parse("#f0f0f0 on #e2e28a")
|
||||
|
||||
def time_parse_mixed_complex_style(self):
|
||||
Style.parse("dim bold reverse #00ee00 on rgb(123,12,50)")
|
||||
|
||||
|
||||
class ColorSuite:
|
||||
def setup(self):
|
||||
self.console = Console(
|
||||
file=StringIO(), color_system="truecolor", legacy_windows=False, width=100
|
||||
)
|
||||
self.color = Color.parse("#0d1da0")
|
||||
|
||||
def time_downgrade_to_eight_bit(self):
|
||||
self.color.downgrade(ColorSystem.EIGHT_BIT)
|
||||
|
||||
def time_downgrade_to_standard(self):
|
||||
self.color.downgrade(ColorSystem.STANDARD)
|
||||
|
||||
def time_downgrade_to_windows(self):
|
||||
self.color.downgrade(ColorSystem.WINDOWS)
|
||||
|
||||
|
||||
class ColorSuiteCached:
|
||||
def setup(self):
|
||||
self.console = Console(
|
||||
file=StringIO(), color_system="truecolor", legacy_windows=False, width=100
|
||||
)
|
||||
self.color = Color.parse("#0d1da0")
|
||||
# Warm cache
|
||||
self.color.downgrade(ColorSystem.EIGHT_BIT)
|
||||
self.color.downgrade(ColorSystem.STANDARD)
|
||||
self.color.downgrade(ColorSystem.WINDOWS)
|
||||
|
||||
def time_downgrade_to_eight_bit(self):
|
||||
self.color.downgrade(ColorSystem.EIGHT_BIT)
|
||||
|
||||
def time_downgrade_to_standard(self):
|
||||
self.color.downgrade(ColorSystem.STANDARD)
|
||||
|
||||
def time_downgrade_to_windows(self):
|
||||
self.color.downgrade(ColorSystem.WINDOWS)
|
||||
|
||||
|
||||
class SegmentSuite:
|
||||
def setup(self):
|
||||
self.console = Console(
|
||||
file=StringIO(), color_system="truecolor", legacy_windows=False, width=100
|
||||
)
|
|
@ -0,0 +1,483 @@
|
|||
{
|
||||
"benchmarks.ColorSuite.time_downgrade_to_eight_bit": {
|
||||
"code": "class ColorSuite:\n def time_downgrade_to_eight_bit(self):\n self.color.downgrade(ColorSystem.EIGHT_BIT)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)\n self.color = Color.parse(\"#0d1da0\")",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.ColorSuite.time_downgrade_to_eight_bit",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "019b972f782c6291df9a6a4dea9bb3c6268a69b177e71383d6e19a608e84920d",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.ColorSuite.time_downgrade_to_standard": {
|
||||
"code": "class ColorSuite:\n def time_downgrade_to_standard(self):\n self.color.downgrade(ColorSystem.STANDARD)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)\n self.color = Color.parse(\"#0d1da0\")",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.ColorSuite.time_downgrade_to_standard",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "f5e8556491c977450fff6ebfd9fff4fc8f12d74829aa5b8570bd27ea7a1c9d28",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.ColorSuite.time_downgrade_to_windows": {
|
||||
"code": "class ColorSuite:\n def time_downgrade_to_windows(self):\n self.color.downgrade(ColorSystem.WINDOWS)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)\n self.color = Color.parse(\"#0d1da0\")",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.ColorSuite.time_downgrade_to_windows",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "373eb97dd7ce2823e080972249235f528e8b3a47210911981cf432ecf0eef5fb",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.ColorSuiteCached.time_downgrade_to_eight_bit": {
|
||||
"code": "class ColorSuiteCached:\n def time_downgrade_to_eight_bit(self):\n self.color.downgrade(ColorSystem.EIGHT_BIT)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)\n self.color = Color.parse(\"#0d1da0\")\n # Warm cache\n self.color.downgrade(ColorSystem.EIGHT_BIT)\n self.color.downgrade(ColorSystem.STANDARD)\n self.color.downgrade(ColorSystem.WINDOWS)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.ColorSuiteCached.time_downgrade_to_eight_bit",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "716ff06a471a5d90af3730f6d4470eba3577432d781e0210dff1fd156b8c549c",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.ColorSuiteCached.time_downgrade_to_standard": {
|
||||
"code": "class ColorSuiteCached:\n def time_downgrade_to_standard(self):\n self.color.downgrade(ColorSystem.STANDARD)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)\n self.color = Color.parse(\"#0d1da0\")\n # Warm cache\n self.color.downgrade(ColorSystem.EIGHT_BIT)\n self.color.downgrade(ColorSystem.STANDARD)\n self.color.downgrade(ColorSystem.WINDOWS)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.ColorSuiteCached.time_downgrade_to_standard",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "3a752a7884e99e095c31b2a28cfefdf916cb2033c06afae1ea146a72f3ba650c",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.ColorSuiteCached.time_downgrade_to_windows": {
|
||||
"code": "class ColorSuiteCached:\n def time_downgrade_to_windows(self):\n self.color.downgrade(ColorSystem.WINDOWS)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)\n self.color = Color.parse(\"#0d1da0\")\n # Warm cache\n self.color.downgrade(ColorSystem.EIGHT_BIT)\n self.color.downgrade(ColorSystem.STANDARD)\n self.color.downgrade(ColorSystem.WINDOWS)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.ColorSuiteCached.time_downgrade_to_windows",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "1732bbd18ada49eb7b054fc18b40d6acfb533023463366f37203dab6fbb0cc20",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.PrettySuite.time_pretty": {
|
||||
"code": "class PrettySuite:\n def time_pretty(self):\n pretty = Pretty(snippets.PYTHON_DICT)\n self.console.print(pretty)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.PrettySuite.time_pretty",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "9bb0e6d8a29aad21b3d1b550a160fa5f1e9030c69d16bad500c0dcc77bff6d01",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.PrettySuite.time_pretty_indent_guides": {
|
||||
"code": "class PrettySuite:\n def time_pretty_indent_guides(self):\n pretty = Pretty(snippets.PYTHON_DICT, indent_guides=True)\n self.console.print(pretty)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.PrettySuite.time_pretty_indent_guides",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "8d71bf19dfe999b0fba95d009986bfd6911c53c7a0c455466725f553005c3bc7",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.PrettySuite.time_pretty_justify_center": {
|
||||
"code": "class PrettySuite:\n def time_pretty_justify_center(self):\n pretty = Pretty(snippets.PYTHON_DICT, justify=\"center\")\n self.console.print(pretty)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.PrettySuite.time_pretty_justify_center",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "54cbf71bacab14ccbe1d063847c0b89198ed1bbe06edc89c14d2e3c7b1986c41",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.StyleSuite.time_parse_ansi": {
|
||||
"code": "class StyleSuite:\n def time_parse_ansi(self):\n Style.parse(\"red on blue\")\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.StyleSuite.time_parse_ansi",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "a003aaa8017585efeb1cd9c43351282df4df6249bf28a4c447b1304d984aa753",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.StyleSuite.time_parse_hex": {
|
||||
"code": "class StyleSuite:\n def time_parse_hex(self):\n Style.parse(\"#f0f0f0 on #e2e28a\")\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.StyleSuite.time_parse_hex",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "cf5a3f0def435d3da5bc3a6e7549c44c0a02e9cce6c00ecde8dd7f527556f8ca",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.StyleSuite.time_parse_mixed_complex_style": {
|
||||
"code": "class StyleSuite:\n def time_parse_mixed_complex_style(self):\n Style.parse(\"dim bold reverse #00ee00 on rgb(123,12,50)\")\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False, width=100)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.StyleSuite.time_parse_mixed_complex_style",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "01c9e12ae829b1984e55a5aeef1a9ae6f1461577adaf5ae59f06358c8b52802f",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.SyntaxWrappingSuite.time_text_thin_terminal_heavy_wrapping": {
|
||||
"code": "class SyntaxWrappingSuite:\n def time_text_thin_terminal_heavy_wrapping(self):\n self._print_with_width(20)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.syntax = Syntax(code=snippets.PYTHON_SNIPPET, lexer=\"python\", word_wrap=True)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.SyntaxWrappingSuite.time_text_thin_terminal_heavy_wrapping",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "1ed4d74ea424990cfb40c96f07635f9bcf7b8bacc7ade5204aaf96363e1622ee",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.SyntaxWrappingSuite.time_text_thin_terminal_medium_wrapping": {
|
||||
"code": "class SyntaxWrappingSuite:\n def time_text_thin_terminal_medium_wrapping(self):\n self._print_with_width(60)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.syntax = Syntax(code=snippets.PYTHON_SNIPPET, lexer=\"python\", word_wrap=True)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.SyntaxWrappingSuite.time_text_thin_terminal_medium_wrapping",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "0880e162a4907ee025cef8ac3380502554fde27fd0c90a4c15cebc9c27f3e333",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.SyntaxWrappingSuite.time_text_wide_terminal_no_wrapping": {
|
||||
"code": "class SyntaxWrappingSuite:\n def time_text_wide_terminal_no_wrapping(self):\n self._print_with_width(100)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.syntax = Syntax(code=snippets.PYTHON_SNIPPET, lexer=\"python\", word_wrap=True)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.SyntaxWrappingSuite.time_text_wide_terminal_no_wrapping",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "feb11e94ae6a75de2dee899fb93db098b55cde232710660d7d66f9e2b288d9c0",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TableSuite.time_table_heavy_wrapping": {
|
||||
"code": "class TableSuite:\n def time_table_heavy_wrapping(self):\n self._print_table(width=30)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TableSuite.time_table_heavy_wrapping",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "ca515a9739c1e0f8eb922420f9f9caf27321fb13c8bd0bc49b207a0588b370de",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TableSuite.time_table_no_wrapping": {
|
||||
"code": "class TableSuite:\n def time_table_no_wrapping(self):\n self._print_table(width=100)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TableSuite.time_table_no_wrapping",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "8842a5f141d8208ba2bab66e4973e978cb5d0615f326af5d70385ff8fa44b3b9",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_align_center": {
|
||||
"code": "class TextSuite:\n def time_align_center(self):\n Text(snippets.LOREM_IPSUM).align(\"center\", width=self.len_lorem_ipsum * 3)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_align_center",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "1ceeeef2de43fcb3d0dfec409972d8f0eb791e9615fa9f9c959e0423725b089b",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_align_center_unicode_heavy": {
|
||||
"code": "class TextSuite:\n def time_align_center_unicode_heavy(self):\n Text(snippets.UNICODE_HEAVY_TEXT).align(\"center\", width=self.len_lorem_ipsum * 3)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_align_center_unicode_heavy",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "a83ff79614dd2ae17e8b68f45981fcaa0d9833c59a7a14f171b896cf970f54ce",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_divide": {
|
||||
"code": "class TextSuite:\n def time_divide(self):\n Text(snippets.LOREM_IPSUM).divide(range(20, 100, 4))\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_divide",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "dcc120b921cb2ec77632f8fe2f6f4150d479cb49ef2608f8e86b569a937756e9",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_divide_unicode_heavy": {
|
||||
"code": "class TextSuite:\n def time_divide_unicode_heavy(self):\n Text(snippets.UNICODE_HEAVY_TEXT).divide(range(20, 100, 4))\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_divide_unicode_heavy",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "ea53e662c0553324f90ac3336dcee77f733bb33638888e1f84bf71945a2f3f8e",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_fit": {
|
||||
"code": "class TextSuite:\n def time_fit(self):\n Text(snippets.LOREM_IPSUM).fit(12)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_fit",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "ec77b412db357b1e1c1e7bc620b941dddfc36dc76d2a66a0417feae4f21fe1d3",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_fit_unicode_heavy": {
|
||||
"code": "class TextSuite:\n def time_fit_unicode_heavy(self):\n Text(snippets.UNICODE_HEAVY_TEXT).fit(12)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_fit_unicode_heavy",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "d1574b4af2ef8b80b95b4dbeeb13e5de67b66783f76f9968834776239dd0dc66",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_indent_guides": {
|
||||
"code": "class TextSuite:\n def time_indent_guides(self):\n Text(snippets.PYTHON_SNIPPET).with_indent_guides()\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_indent_guides",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "18da036dcfc15ec5e3c11e72be7c8f0c22fba695a5f19c95836be36952376cf2",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_render": {
|
||||
"code": "class TextSuite:\n def time_render(self):\n Text(snippets.LOREM_IPSUM).render(self.console)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_render",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "907d30581cfdc7bb2c4d302b7e3cb474aaefd8b84821365fe105af7d82be3b09",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_render_unicode_heavy": {
|
||||
"code": "class TextSuite:\n def time_render_unicode_heavy(self):\n Text(snippets.UNICODE_HEAVY_TEXT).render(self.console)\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_render_unicode_heavy",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "b3f1c09dfd06f412a20dacfe378c3b446727c7d4f9a975336eab3daa8543e1cb",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_split": {
|
||||
"code": "class TextSuite:\n def time_split(self):\n Text(snippets.LOREM_IPSUM).split()\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_split",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "9c165854130cb95fea5491ffcd8b580a5bd373149da2ef8aace0e9480f649854",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_split_unicode_heavy": {
|
||||
"code": "class TextSuite:\n def time_split_unicode_heavy(self):\n Text(snippets.UNICODE_HEAVY_TEXT).split()\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_split_unicode_heavy",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "d55b02f6d06f478d70635bac3409f3a9899137d9cee87a70a293b8ccf5a6afa4",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_wrapping": {
|
||||
"code": "class TextSuite:\n def time_wrapping(self):\n Text(snippets.LOREM_IPSUM).wrap(self.console, 12, overflow=\"fold\")\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_wrapping",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "8c821eba13d043f228fd902d8f678c397741855db05d02abe9b82f3d65cdf03d",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"benchmarks.TextSuite.time_wrapping_unicode_heavy": {
|
||||
"code": "class TextSuite:\n def time_wrapping_unicode_heavy(self):\n Text(snippets.UNICODE_HEAVY_TEXT).wrap(self.console, 12, overflow=\"fold\")\n\n def setup(self):\n self.console = Console(file=StringIO(), color_system=\"truecolor\", legacy_windows=False)\n self.len_lorem_ipsum = len(snippets.LOREM_IPSUM)",
|
||||
"min_run_count": 2,
|
||||
"name": "benchmarks.TextSuite.time_wrapping_unicode_heavy",
|
||||
"number": 0,
|
||||
"param_names": [],
|
||||
"params": [],
|
||||
"repeat": 0,
|
||||
"rounds": 2,
|
||||
"sample_time": 0.01,
|
||||
"timeout": 60.0,
|
||||
"type": "time",
|
||||
"unit": "seconds",
|
||||
"version": "ec6e2ef08b6cdee182fef4e26c0043f8c365984f9a31be07dbd792e1aed862d8",
|
||||
"warmup_time": -1
|
||||
},
|
||||
"version": 2
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue