[ipxe-devel] time command - store result in variable

Robert Socha socha at socha.it
Fri Aug 14 08:05:54 UTC 2020


Hi,

I'm doing some benchmarks (undi,snp, native drivers).
And I needed to pass time results to external scripts. I added option to 
store time results in variable.

And I can use it for example that way:

#!ipxe
set url http://100.100.100.69/100.bin
set loops:int8 5
set n:int8 0

:benchmark
imgfree
time -n -s _bench${n} imgfetch ${url}
inc n
iseq ${n} ${loops} || goto benchmark

set n:int8 0

:print
echo Run ${n} took ${_bench${n}} ms
inc n
iseq ${n} ${loops} || goto print


Patch:
https://raw.githubusercontent.com/rjsocha/ipxe-misc-patches/master/time-store-to-variable/time.diff

Any suggestion if this is correct way to store some data in variable?

Best regards
-- 
Robert Socha



More information about the ipxe-devel mailing list