Created
April 4, 2011 23:38
-
-
Save athomason/902718 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature ':5.10'; | |
use Time::HiRes qw(time); | |
my $iterations = 1000000; | |
use Log::Syslog::Fast ':all'; | |
my $lsf = Log::Syslog::Fast->new(LOG_UDP, "localhost", 1234, LOG_AUTH, LOG_INFO, 'sender', 'name'); | |
my $start = time(); | |
for(1..$iterations){ | |
$lsf->send('this is an example log message!'); | |
} | |
my $time = time() - $start; | |
printf("%d took %f2: %d per second\n", $iterations, $time, $iterations/$time); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment