Bencher::Scenario::TimeHiRes::usleep_accuracy - Demonstrate inaccuracy of doing lots of small usleep
This document describes version 0.003 of Bencher::Scenario::TimeHiRes::usleep_accuracy (from Perl distribution Bencher-Scenarios-TimeHiRes), released on 2018-12-21.
To run benchmark with default option:
% bencher -m TimeHiRes::usleep_accuracy
To run module startup overhead benchmark:
% bencher --module-startup -m TimeHiRes::usleep_accuracy
For more options (dump scenario, list/include/exclude/add participants, list/include/exclude/add datasets, etc), see bencher or run bencher --help.
bencher --help
Basically the same as Bencher::Scenario::TimeHiRes::sleep_accuracy.
Version numbers shown below are the versions used when running the sample benchmark.
Time::HiRes
1e5 x1 (perl_code)
Function call template:
Time::HiRes::usleep(1e5)
1e4 x10 (perl_code)
Time::HiRes::usleep(1e4) for 1..10
1e3 x100 (perl_code)
Time::HiRes::usleep(1e3) for 1..100
1e2 x1000 (perl_code)
Time::HiRes::usleep(1e2) for 1..1000
1e1 x10000 (perl_code)
Time::HiRes::usleep(1e1) for 1..10000
1e0 x100000 (perl_code)
Time::HiRes::usleep(1e0) for 1..100_000
Please visit the project's homepage at https://metacpan.org/release/Bencher-Scenarios-TimeHiRes.
Source repository is at https://github.com/perlancar/perl-Bencher-Scenarios-TimeHiRes.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Bencher-Scenarios-TimeHiRes
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2018, 2017, 2016 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Bencher::Scenarios::TimeHiRes, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bencher::Scenarios::TimeHiRes
CPAN shell
perl -MCPAN -e shell install Bencher::Scenarios::TimeHiRes
For more information on module installation, please visit the detailed CPAN module installation guide.