github.com/whatlly/hugo@v0.47.1/benchSite.sh (about)

     1  #!/bin/bash
     2  
     3  # allow user to override go executable by running as GOEXE=xxx make ...
     4  GOEXE="${GOEXE-go}"
     5  
     6  # Send in a regexp mathing the benchmarks you want to run, i.e. './benchSite.sh "YAML"'. 
     7  # Note the quotes, which will be needed for more complex expressions.
     8  # The above will run all variations, but only for front matter YAML.
     9  
    10  echo "Running with BenchmarkSiteBuilding/${1}"
    11  
    12  "${GOEXE}" test -run="NONE" -bench="BenchmarkSiteBuilding/${1}" -test.benchmem=true ./hugolib -memprofile mem.prof -count 3 -cpuprofile cpu.prof