mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 16:28:19 +02:00
Adjust amount of data in the benchmarks for more consistent timing
This commit is contained in:
@@ -116,6 +116,7 @@ Build-time dependencies:
|
|||||||
- ``libssl-dev``
|
- ``libssl-dev``
|
||||||
- ``libpython3-dev``
|
- ``libpython3-dev``
|
||||||
- ``libxxhash-dev``
|
- ``libxxhash-dev``
|
||||||
|
- ``libsmide-dev``
|
||||||
|
|
||||||
|
|
||||||
Build and run from source with Nix
|
Build and run from source with Nix
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ type result struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func simple_ascii() (r result, err error) {
|
func simple_ascii() (r result, err error) {
|
||||||
data := random_string_of_bytes(1024*1024+13, ascii_printable)
|
data := random_string_of_bytes(1024*2048+13, ascii_printable)
|
||||||
duration, err := benchmark_data(data, default_benchmark_options())
|
duration, err := benchmark_data(data, default_benchmark_options())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return result{}, err
|
return result{}, err
|
||||||
@@ -122,7 +122,7 @@ func simple_ascii() (r result, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func unicode() (r result, err error) {
|
func unicode() (r result, err error) {
|
||||||
data := strings.Repeat(chinese_lorem_ipsum+misc_unicode, 64)
|
data := strings.Repeat(chinese_lorem_ipsum+misc_unicode, 1024)
|
||||||
duration, err := benchmark_data(data, default_benchmark_options())
|
duration, err := benchmark_data(data, default_benchmark_options())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return result{}, err
|
return result{}, err
|
||||||
@@ -131,7 +131,7 @@ func unicode() (r result, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ascii_with_csi() (r result, err error) {
|
func ascii_with_csi() (r result, err error) {
|
||||||
const sz = 1024 * 1024 * 17
|
const sz = 1024*1024 + 17
|
||||||
out := make([]byte, 0, sz+48)
|
out := make([]byte, 0, sz+48)
|
||||||
src := rand_src()
|
src := rand_src()
|
||||||
chunk := ""
|
chunk := ""
|
||||||
@@ -168,7 +168,7 @@ func images() (r result, err error) {
|
|||||||
g.SetQuiet(graphics.GRT_quiet_silent)
|
g.SetQuiet(graphics.GRT_quiet_silent)
|
||||||
g.SetAction(graphics.GRT_action_query)
|
g.SetAction(graphics.GRT_action_query)
|
||||||
g.SetFormat(graphics.GRT_format_rgba)
|
g.SetFormat(graphics.GRT_format_rgba)
|
||||||
const dim = 1024
|
const dim = 2048
|
||||||
g.SetDataWidth(dim)
|
g.SetDataWidth(dim)
|
||||||
g.SetDataHeight(dim)
|
g.SetDataHeight(dim)
|
||||||
b := strings.Builder{}
|
b := strings.Builder{}
|
||||||
|
|||||||
Reference in New Issue
Block a user