[botan-devel] Set the cpu speed in the environment or command line for ./botan speed

Jack Lloyd jack at randombit.net
Thu Mar 8 05:41:44 EST 2018


On Wed, Mar 07, 2018 at 08:13:33PM -0500, Jeffrey Walton wrote:
> Hi Everyone,
> 
> I'm looking for a way to set the cpu speed in the environment or from
> the command line when running ./botan speed.
> 

This doesn't exist in 2.4 but in master (upcoming 2.5) you can use the
option --cpu-clock-ratio which expresses a ratio between the measured
CPU clocks and the actual CPU clocks. This was added for POWER8 which
has a fixed 512 MHz timebase, regardless of what the processor is
running at. So for example on a 3.0 GHz POWER8 you would use
--cpu-clock-ratio=.17 (.17 ~ 512/3000) so that CPU clocks are reported
correctly.

Worth mentioning we don't have any code for getting the cycle counter
on ARM or MIPS so for IoT this will not be useful anyway.

Jack


More information about the botan-devel mailing list