The Wayback Machine - https://web.archive.org/web/20201206195459/https://github.com/sharkdp/hyperfine/issues/351
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we make the --command-name take the same arguments from --parameter-list as the actual command #351

Open
fredericcogny opened this issue Nov 23, 2020 · 1 comment

Comments

@fredericcogny
Copy link

@fredericcogny fredericcogny commented Nov 23, 2020

I would like to parameterize the command name based on the parameters from the parameter list

Currently the --command-name only seem to take into account the first one in the list it would be nice if we could parametrerize the --command-name with the <VAR> as we do in the actual command

Here is a concrete example I'm running

hyperfine "brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling {jacH}  --evaluationMethod {evalMet}" --max-runs 2 --export-json hyperfine.json --parameter-list jacH DenseJacobian,SparseJacobian,ApproxJacobian --parameter-list evalMet LLVM,Haskell --command-name {jacH}-{evalMet}
Benchmark #1: {jacH}-{evalMet}
  Time (mean ± σ):     163.091 s ±  1.368 s    [User: 161.179 s, System: 1.668 s]
  Range (min … max):   162.124 s … 164.059 s    2 runs
 
Benchmark #2: brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling SparseJacobian  --evaluationMethod LLVM
  Time (mean ± σ):     164.887 s ±  5.918 s    [User: 162.802 s, System: 0.919 s]
  Range (min … max):   160.703 s … 169.072 s    2 runs
 
Benchmark #3: brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling ApproxJacobian  --evaluationMethod LLVM
  Time (mean ± σ):     14.131 s ±  1.073 s    [User: 12.768 s, System: 0.110 s]
  Range (min … max):   13.373 s … 14.890 s    2 runs
 
Benchmark #4: brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling DenseJacobian  --evaluationMethod Haskell
  Time (mean ± σ):     481.328 s ±  0.731 s    [User: 479.976 s, System: 1.563 s]
  Range (min … max):   480.811 s … 481.845 s    2 runs
 
Benchmark #5: brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling SparseJacobian  --evaluationMethod Haskell
  Time (mean ± σ):     505.488 s ±  6.620 s    [User: 503.011 s, System: 1.796 s]
  Range (min … max):   500.807 s … 510.169 s    2 runs
 
Benchmark #6: brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling ApproxJacobian  --evaluationMethod Haskell
  Time (mean ± σ):     900.906 s ± 12.950 s    [User: 895.857 s, System: 3.312 s]
  Range (min … max):   891.750 s … 910.063 s    2 runs
 
Summary
  'brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling ApproxJacobian  --evaluationMethod LLVM' ran
   11.54 ± 0.88 times faster than '{jacH}-{evalMet}'
   11.67 ± 0.98 times faster than 'brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling SparseJacobian  --evaluationMethod LLVM'
   34.06 ± 2.59 times faster than 'brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling DenseJacobian  --evaluationMethod Haskell'
   35.77 ± 2.76 times faster than 'brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling SparseJacobian  --evaluationMethod Haskell'
   63.75 ± 4.93 times faster than 'brun -c opt -- //simwork/examples:Hepatitis@run --jacHandling ApproxJacobian  --evaluationMethod Haskell'
@sharkdp
Copy link
Owner

@sharkdp sharkdp commented Nov 23, 2020

Thank you for this request.

Currently the --command-name only seem to take into account the first one in the list it would be nice if we could parametrerize the --command-name with the <VAR> as we do in the actual command

Sounds like a very useful new feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.