Commit Graph

20 Commits

Author SHA1 Message Date
Mahdi Dibaiee
312c8ef01f
Add new --style called header-filesize and display it by default (#1988)
Also rename `header` to `header-filename`.

Related to #1701
2022-02-07 20:48:57 +01:00
Martin Nordholts
0fa99518ce run-benchmarks.sh: Use python3 oneliner instead of jq
I am setting up a new computer and thus are missing a lot of tools. I
noticed we rely on `jq` being installed, which is a bit annoying when it
is not installed yet.

We can quite easily get rid of this dependecy on `jq` by using a simple
`python3` oneliner.
2022-02-03 08:00:14 +01:00
Martin Nordholts
6d0eb0749e run-benchmarks: Benchmark both --wrap=character and --wrap=never 2021-12-08 15:45:46 +01:00
Martin Nordholts
36c1ea4599 run-benchmarks.sh: Don't benchmark startup time syntaxes twice 2021-12-08 12:02:11 +01:00
Martin Nordholts
747b15436a run-benchmarks.sh: Add third 'Startup time' variant
Using Markdown for a startup test is useful since it has so many dependencies on
other syntaxes. So such a test makes sure that lazy-loading of syntaxes work.

It is however also useful to measure the startup time of bat when the time to
load a syntax is very small, and the measured startup time has mostly non-syntax
related causes. Such as:
 * Parsing arguments
 * Setting up syntax mapping
 * Loading themes

This commit adds such a test. It uses the CpuInfo syntax which is very small.
Only 14 lines, compared to the 1581 lines that Markdown is (not including the
size of its included syntaxes).

This command can be used to get an approximation of the size of syntaxes, and
thus how expensive they are to load:

    find -name *.sublime-syntax -print0 | xargs --null wc -l | sort -n -r
2021-11-27 10:39:17 +01:00
Martin Nordholts
206bf5b8d6 run-benchmarks.sh: Add new test 'Startup time with syntax highlighting' 2021-11-26 20:14:30 +01:00
David Peter
b3aefd2d41 Add Python highlighting test 2021-11-23 08:14:49 +01:00
David Peter
6fd78ea3f6 Clean benchmarking environment 2021-11-23 08:14:49 +01:00
David Peter
b12503a46a Markdown (and JSON) reports 2021-11-23 08:14:49 +01:00
David Peter
ea2faf45e4 Simplify cargo-target-dir extraction 2021-11-23 08:14:49 +01:00
a1346054
51edacb5eb style: trim excess whitespace 2021-08-21 23:07:37 +02:00
Ethan P
1b549ecc66
Merge branch 'master' into improved-benchmark 2021-01-02 21:35:58 -08:00
Ethan P
3ed0081f1f
Improve benchmark script to support cargo/config target-dir 2020-12-29 15:07:22 -08:00
VeryTastyTomato
973ea984c8 fix: warnings of ShellCheck
SC2155: Declare and assign separately to avoid masking return values.
SC2164: Use cd ... || exit in case cd fails.
SC2230: which is non-standard. Use builtin 'command -v' instead.
2020-12-21 09:08:54 +01:00
Ethan P
e26ec31463
Add option to specify exact binary in run-benchmarks.sh 2020-10-05 15:47:28 -07:00
Ethan P
e3bc41dbe6
Add option to specify bat target in run-benchmarks.sh 2020-10-05 15:47:22 -07:00
Matthias Devlamynck
12340c1d10 Add change dir to script dir to allow running from project root dir 2020-10-04 19:35:32 +02:00
Matthias Devlamynck
b50bd58795 Replace #!/bin/bash with #!/usr/bin/env bash to improve compatibility with systems where /bin/bash is not available 2020-10-04 11:51:07 +02:00
sharkdp
39e2971e96 Add .ignore files to avoid searching asset folders 2018-05-25 17:44:50 +02:00
sharkdp
54b33c8c21 Add simple benchmark scripts 2018-05-14 22:20:26 +02:00