mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 17:59:36 +01:00
libstore-tests: Build and run benchmarks in CI
This changes our GHA CI and nix-store-tests packaging to build and run the benchmarks. This does not affect the default packaging - the overrides apply only for the GHA CI.
This commit is contained in:
parent
b2b2f2dc53
commit
ea1f67393d
4 changed files with 38 additions and 15 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include "nix/store/derivations.hh"
|
||||
#include "nix/store/store-api.hh"
|
||||
#include "nix/util/experimental-features.hh"
|
||||
#include "nix/util/environment-variables.hh"
|
||||
#include "nix/store/store-open.hh"
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
|
@ -28,5 +29,11 @@ static void BM_ParseRealDerivationFile(benchmark::State & state, const std::stri
|
|||
}
|
||||
|
||||
// Register benchmarks for actual test derivation files if they exist
|
||||
BENCHMARK_CAPTURE(BM_ParseRealDerivationFile, hello, std::string(NIX_UNIT_TEST_DATA) + "/derivation/hello.drv");
|
||||
BENCHMARK_CAPTURE(BM_ParseRealDerivationFile, firefox, std::string(NIX_UNIT_TEST_DATA) + "/derivation/firefox.drv");
|
||||
BENCHMARK_CAPTURE(
|
||||
BM_ParseRealDerivationFile,
|
||||
hello,
|
||||
getEnvNonEmpty("_NIX_TEST_UNIT_DATA").value_or(NIX_UNIT_TEST_DATA) + "/derivation/hello.drv");
|
||||
BENCHMARK_CAPTURE(
|
||||
BM_ParseRealDerivationFile,
|
||||
firefox,
|
||||
getEnvNonEmpty("_NIX_TEST_UNIT_DATA").value_or(NIX_UNIT_TEST_DATA) + "/derivation/firefox.drv");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue