Permalink
Browse files

Add the first benchmarking/profiling program: event creation & destru…

…ction.
  • Loading branch information...
1 parent 9dc4b34 commit 55385547d6508b2aa44b740969a6409c1cb6eb65 @rcaputo committed Jun 4, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 eg/bench-event.pl
View
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+
+# A program to benchmark and/or profile event creation and
+# destruction.
+#
+# Sample usage:
+#
+# perl -d:NYTProf bench-event.pl
+# nytprofhtml
+# open nytprof/index.html
+
+use warnings;
+use strict;
+
+use Reflex::Event;
+
+my $i = 100_000;
+while ($i--) {
+ my $e = Reflex::Event->new( _name => 'anything', _emitters => [ ] );
+}

0 comments on commit 5538554

Please sign in to comment.