Monkey patch two dependencies to use /dev/unrandom over /dev/random #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proof of concept... I don't recommend or expect you to actually merge this! :-)
This makes the tests 11-encrypt.t and 13-keygen.t run consistently
quickly, whereas before they were intermittently much slower.
Before:
$ for i in $(seq 1 10) ; do prove -b t/11-encrypt.t 2>&1 | grep wallclock ; done
Files=1, Tests=36, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.67 cusr 0.01 csys = 0.71 CPU)
Files=1, Tests=36, 1 wallclock secs ( 0.04 usr 0.00 sys + 0.64 cusr 0.02 csys = 0.70 CPU)
Files=1, Tests=36, 80 wallclock secs ( 0.03 usr 0.00 sys + 0.66 cusr 0.01 csys = 0.70 CPU)
Files=1, Tests=36, 87 wallclock secs ( 0.04 usr 0.00 sys + 0.55 cusr 0.00 csys = 0.59 CPU)
Files=1, Tests=36, 67 wallclock secs ( 0.03 usr 0.00 sys + 0.58 cusr 0.00 csys = 0.61 CPU)
Files=1, Tests=36, 89 wallclock secs ( 0.03 usr 0.01 sys + 0.49 cusr 0.02 csys = 0.55 CPU)
Files=1, Tests=36, 83 wallclock secs ( 0.03 usr 0.01 sys + 0.65 cusr 0.02 csys = 0.71 CPU)
Files=1, Tests=36, 80 wallclock secs ( 0.04 usr 0.01 sys + 0.60 cusr 0.01 csys = 0.66 CPU)
Files=1, Tests=36, 34 wallclock secs ( 0.04 usr 0.00 sys + 0.62 cusr 0.03 csys = 0.69 CPU)
Files=1, Tests=36, 32 wallclock secs ( 0.02 usr 0.00 sys + 0.54 cusr 0.01 csys = 0.57 CPU)
After:
$ for i in $(seq 1 10) ; do prove -b t/11-encrypt.t 2>&1 | grep wallclock ; done
Files=1, Tests=36, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.43 cusr 0.01 csys = 0.46 CPU)
Files=1, Tests=36, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.41 cusr 0.00 csys = 0.43 CPU)
Files=1, Tests=36, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.40 cusr 0.01 csys = 0.43 CPU)
Files=1, Tests=36, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.40 cusr 0.00 csys = 0.43 CPU)
Files=1, Tests=36, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.42 cusr 0.02 csys = 0.47 CPU)
Files=1, Tests=36, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.40 cusr 0.01 csys = 0.44 CPU)
Files=1, Tests=36, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.40 cusr 0.00 csys = 0.43 CPU)
Files=1, Tests=36, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.39 cusr 0.01 csys = 0.43 CPU)
Files=1, Tests=36, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.41 cusr 0.01 csys = 0.45 CPU)
Files=1, Tests=36, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.41 cusr 0.00 csys = 0.44 CPU)