Skip to content

Instantly share code, notes, and snippets.

View exodist's full-sized avatar

Chad Granum exodist

View GitHub Profile
prove2 -j9 -LMoose t 61.95s user 11.15s system 332% cpu 21.973 total
prove2 -j9 t 175.76s user 18.00s system 356% cpu 54.372 total
prove -j9 -r t 169.45s user 10.21s system 358% cpu 50.083 total
@exodist
exodist / 
Created April 23, 2016 11:49
cgi-speedy
cpanm (App::cpanminus) 1.7040 on perl 5.020003 built for x86_64-linux-thread-multi
Work directory is /home/exodist/.cpanm/work/1461412129.15680
You have make /usr/bin/make
You have LWP 6.15
You have /usr/bin/tar: tar (GNU tar) 1.28
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
NO TAINT
Files=721, Tests=8937, 1178 wallclock secs ( 6.11 usr 1.45 sys + 1216.61 cusr 354.40 csys = 1578.57 CPU)
Result: PASS
prove -Ilib -r t/unit/ 1222.84s user 355.87s system 134% cpu 19:37.50 total
WITH TAINT
Files=721, Tests=8930, 1177 wallclock secs ( 6.19 usr 1.41 sys + 1212.20 cusr 356.12 csys = 1575.92 CPU)
Result: FAIL
prove -Ilib -r t/unit/ 1218.54s user 357.55s system 133% cpu 19:36.48 total
@exodist
exodist / harness comparisons
Created May 25, 2016 00:12
Harness Comparison
Test::Harness (-j9):
180.89s user 10.68s system 340% cpu 56.340 total
Yath No Preload (-j9):
197.49s user 11.62s system 343% cpu 1:00.84 total
Yath Preload Moose (-j9):
96.71s user 16.82s system 321% cpu 35.332 total
@exodist
exodist / test.pl
Created May 30, 2016 14:50
minimal inline testing
sub ok($;$) {$_[0] || $T::FAIL++; print( ($_[0] ? "ok " : "not ok ") . ++$T::NUM . ($_[1] ? " - $_[1]\n" : "\n"))}
sub done_testing { print "1..$T::NUM\n" }
END { $? ||= $T::FAIL; $? = 255 if $? > 255 }
# Start
in1---->[]---->fan
in2---->[]---->light
# BAD
in1---->[]---->light
in2---->[]---->fan
# Good
in2---->[]---->light
@exodist
exodist / Generic.pm
Created June 2, 2016 22:22
Generic.pm
package Test2::Event::Generic;
use strict;
use warnings;
use Carp qw/croak/;
use Scalar::Util qw/reftype/;
our $VERSION = '1.302023';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
use Test2::API qw/context run_subtest intercept/;
use Test2::Tools::Basic;
use strict;
use warnings;
sub is_int { 1 }; # Stub
sub is_even {
my ($thing, $name) = @_;
my $ctx = context();
@exodist
exodist / test.pl
Created August 10, 2016 14:56
no diag
use Test2::Bundle::Extended;
use Test2::API qw/test2_stack/;
test2_stack->top->filter(
sub {
my ($hub, $event) = @_;
return if $event->isa('Test2::Event::Diag');
return $event;
},
@exodist
exodist / NoDiag.pm
Created August 10, 2016 15:46
Plugin you can preload to hide diagnostics messages
package Test2::Plugin::NoDiag;
use strict;
use warnings;
use Test2::API qw/test2_stack test2_add_callback_post_load/;
test2_add_callback_post_load(sub {
test2_stack->top->filter(
sub {
my ($hub, $event) = @_;