mirror of
https://github.com/NixOS/nix.git
synced 2025-12-03 07:31:00 +01:00
add derivation parser benchmark
the current identified bottlenecks are parseString in derivations.cc and dirOf (because of std::filessystem creation).
This commit is contained in:
parent
47f5e5fbef
commit
1989dd7bf9
10 changed files with 270 additions and 2 deletions
|
|
@ -105,3 +105,19 @@ test(
|
|||
},
|
||||
protocol : 'gtest',
|
||||
)
|
||||
|
||||
# Build benchmarks if enabled
|
||||
if get_option('benchmarks')
|
||||
gbenchmark = dependency('benchmark', required : true)
|
||||
|
||||
benchmark_exe = executable(
|
||||
'nix-store-benchmarks',
|
||||
'derivation-parser-bench.cc',
|
||||
config_priv_h,
|
||||
dependencies : deps_private_subproject + deps_private + deps_other + [gbenchmark],
|
||||
include_directories : include_dirs,
|
||||
link_args: linker_export_flags,
|
||||
install : false,
|
||||
cpp_args : ['-DNIX_UNIT_TEST_DATA="' + meson.current_source_dir() + '/data"'],
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue