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

Geert Stappers geert.stappers at hendrikx-itc.nl
Fri Aug 14 10:09:43 UTC 2020


On 14-08-2020 10:05, Robert Socha wrote:
> 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?
> 

FWIW  Do know that "it works" is a large part of "the correct way"



Regards
Geert Stappers
Who could resist to visit the above URL
Who could not resist to leave the posting unanswered
Who hopes for a posting like "it does work for me"



More information about the ipxe-devel mailing list