Commit Graph

19 Commits (f3f819493208f32b7a1374578568970ec381f5ac)

Author SHA1 Message Date
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.
3 years ago
Martin Nordholts 6d0eb0749e run-benchmarks: Benchmark both --wrap=character and --wrap=never 3 years ago
Martin Nordholts 36c1ea4599 run-benchmarks.sh: Don't benchmark startup time syntaxes twice 3 years ago
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
3 years ago
Martin Nordholts 206bf5b8d6 run-benchmarks.sh: Add new test 'Startup time with syntax highlighting' 3 years ago
David Peter b3aefd2d41 Add Python highlighting test 3 years ago
David Peter 6fd78ea3f6 Clean benchmarking environment 3 years ago
David Peter b12503a46a Markdown (and JSON) reports 3 years ago
David Peter ea2faf45e4 Simplify cargo-target-dir extraction 3 years ago
a1346054 51edacb5eb style: trim excess whitespace 3 years ago
Ethan P 1b549ecc66
Merge branch 'master' into improved-benchmark 4 years ago
Ethan P 3ed0081f1f
Improve benchmark script to support cargo/config target-dir 4 years ago
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.
4 years ago
Ethan P e26ec31463
Add option to specify exact binary in run-benchmarks.sh 4 years ago
Ethan P e3bc41dbe6
Add option to specify bat target in run-benchmarks.sh 4 years ago
Matthias Devlamynck 12340c1d10 Add change dir to script dir to allow running from project root dir 4 years ago
Matthias Devlamynck b50bd58795 Replace #!/bin/bash with #!/usr/bin/env bash to improve compatibility with systems where /bin/bash is not available 4 years ago
sharkdp 39e2971e96 Add .ignore files to avoid searching asset folders 6 years ago
sharkdp 54b33c8c21 Add simple benchmark scripts 6 years ago