Result:
found more than 872 distributions - search limited to the first 2001 files matching your query ( run in 3.040 )


Dist-Zilla-Plugin-Test-Pod-Coverage-Configurable

 view release on metacpan or  search on metacpan

perltidyrc  view on Meta::CPAN

-npro
-nsfs
--blank-lines-before-packages=0
--opening-hash-brace-right
--no-outdent-long-comments
--iterations=2
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="

 view all matches for this distribution


Dist-Zilla-Plugin-TidyAll

 view release on metacpan or  search on metacpan

perltidyrc  view on Meta::CPAN

-npro
-nsfs
--blank-lines-before-packages=0
--opening-hash-brace-right
--no-outdent-long-comments
--iterations=2
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="

 view all matches for this distribution


Dist-Zilla-Plugin-VersionFromMainModule

 view release on metacpan or  search on metacpan

perltidyrc  view on Meta::CPAN

-npro
-nsfs
--blank-lines-before-packages=0
--opening-hash-brace-right
--no-outdent-long-comments
--iterations=2
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="

 view all matches for this distribution


Dist-Zilla-PluginBundle-ATOOMIC

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/ATOOMIC/TidyAll.pm  view on Meta::CPAN

-npro
-nsfs
--blank-lines-before-packages=0
--opening-hash-brace-right
--no-outdent-long-comments
--iterations=2
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
EOF

sub _perltidyrc {$perltidyrc}

 view all matches for this distribution


Dist-Zilla-PluginBundle-Author-ETHER

 view release on metacpan or  search on metacpan

t/lib/Helper.pm  view on Meta::CPAN

            last;
        }
        $dir = $dir->parent;
    }
    continue {
        die "too many iterations when traversing $dir!"
            if $count++ > 100;
    }
    return $in_git;
}

 view all matches for this distribution



Dist-Zilla-PluginBundle-Author-TABULO

 view release on metacpan or  search on metacpan

share/common/.perltidyrc  view on Meta::CPAN

# GENERAL
-w          # Show all warnings
-se         # Send all error messages to STDERR     # default: OFF (-nse)
--converge  # Try to converge in max 4 iterations

# Text file format
-utf8
-ole=unix   # --output-line-ending=win|dos|unix|mac   # default: <native OS>

 view all matches for this distribution


Dist-Zilla-PluginBundle-DROLSKY

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/DROLSKY/PerlLinterConfigFiles.pm  view on Meta::CPAN

-npro
-nsfs
--blank-lines-before-packages=0
--opening-hash-brace-right
--no-outdent-long-comments
--iterations=2
-wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
EOF

sub _perltidyrc {$perltidyrc}

 view all matches for this distribution


Dist-Zilla-PluginBundle-Git-VersionManager

 view release on metacpan or  search on metacpan

t/lib/Helper.pm  view on Meta::CPAN

            last;
        }
        $dir = $dir->parent;
    }
    continue {
        die "too many iterations when traversing $dir!"
            if $count++ > 100;
    }
    return $in_git;
}

 view all matches for this distribution


Dist-Zilla-PluginBundle-MAXMIND

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/MAXMIND/TidyAll.pm  view on Meta::CPAN

    Dist::Zilla::Role::TextTemplate
);

my $perltidyrc = <<'EOF';
--blank-lines-before-packages=0
--iterations=2
--no-outdent-long-comments
-bar
-boc
-ci=4
-i=4

 view all matches for this distribution


Docker-Client

 view release on metacpan or  search on metacpan

share/specs/v1.28.yaml  view on Meta::CPAN

          Parallelism:
            description: "Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism)."
            type: "integer"
            format: "int64"
          Delay:
            description: "Amount of time between rollback iterations, in nanoseconds."
            type: "integer"
            format: "int64"
          FailureAction:
            description: "Action to take if an rolled back task fails to run, or stops running during the rollback."
            type: "string"

 view all matches for this distribution


Dotiac

 view release on metacpan or  search on metacpan

lib/Dotiac/DTL/Tag/for.pm  view on Meta::CPAN


The current iteration of the loop, starting with 0.

=item forloop.revcounter

The remaining iterations, starting ending with 1.

=item forloop.revcounter0

The remaining iterations, starting ending with 0.

=item forloop.first

True if this iteration is the first one.

 view all matches for this distribution


Doubly-Linked-PP

 view release on metacpan or  search on metacpan

lib/Doubly/Linked/PP.pm  view on Meta::CPAN


	cmpthese $r;

----

	Benchmark: timing 2000000 iterations of Doubly, Doubly::Linked, Doubly::Linked::PP...
	    Doubly: 1.70335 wallclock secs ( 1.62 usr +  0.08 sys =  1.70 CPU) @ 1176470.59/s (n=2000000)
	Doubly::Linked: 7.49174 wallclock secs ( 7.04 usr +  0.44 sys =  7.48 CPU) @ 267379.68/s (n=2000000)
	Doubly::Linked::PP: 26.0622 wallclock secs (25.32 usr +  0.56 sys = 25.88 CPU) @ 77279.75/s (n=2000000)
				Rate Doubly::Linked::PP  Doubly::Linked           Doubly
	Doubly::Linked::PP   77280/s                 --            -71%             -93%

 view all matches for this distribution


Doubly-Linked

 view release on metacpan or  search on metacpan

t/21-memory-leaks.t  view on Meta::CPAN

plan tests => 6;

# Test 1: new() + destroy() should not grow memory
subtest 'new() + destroy() no memory growth' => sub {
    plan tests => 1;
    my $iterations = 100;
    my $before = get_rss();
    for (1..$iterations) {
        my $list = Doubly::Linked->new();
        $list->destroy();
    }
    my $after = get_rss();
    my $growth = $after - $before;
    ok($growth < 500, "Memory growth < 500KB after $iterations iterations (was ${growth}KB)");
};

# Test 2: new() + add() + destroy() should not grow memory
subtest 'new() + add(1) + destroy() no memory growth' => sub {
    plan tests => 1;
    my $iterations = 100;
    my $before = get_rss();
    for (1..$iterations) {
        my $list = Doubly::Linked->new();
        $list->add(1);
        $list->destroy();
    }
    my $after = get_rss();
    my $growth = $after - $before;
    ok($growth < 500, "Memory growth < 500KB after $iterations iterations (was ${growth}KB)");
};

# Test 3: new() + add(1..10) + destroy() should not grow memory
subtest 'new() + add(1..10) + destroy() no memory growth' => sub {
    plan tests => 1;
    my $iterations = 100;
    my $before = get_rss();
    for (1..$iterations) {
        my $list = Doubly::Linked->new();
        $list->add(1..10);
        $list->destroy();
    }
    my $after = get_rss();
    my $growth = $after - $before;
    ok($growth < 500, "Memory growth < 500KB after $iterations iterations (was ${growth}KB)");
};

# Test 4: Longer list should not leak more than short list
subtest 'destroy() breaks circular references regardless of list size' => sub {
    plan tests => 1;
    my $iterations = 50;
    
    # Test with 100 items per list
    my $before = get_rss();
    for (1..$iterations) {
        my $list = Doubly::Linked->new();
        $list->add(1..100);
        $list->destroy();
    }
    my $after = get_rss();
    my $growth = $after - $before;
    ok($growth < 1000, "Memory growth < 1000KB after $iterations iterations of 100-item lists (was ${growth}KB)");
};

# Test 5: remove operations + destroy should not leak
subtest 'remove operations + destroy() no memory growth' => sub {
    plan tests => 1;
    my $iterations = 100;
    my $before = get_rss();
    for (1..$iterations) {
        my $list = Doubly::Linked->new();
        $list->add(1..5);
        $list->remove_from_start();
        $list->remove_from_end();
        $list->destroy();
    }
    my $after = get_rss();
    my $growth = $after - $before;
    ok($growth < 500, "Memory growth < 500KB after $iterations iterations (was ${growth}KB)");
};

# Test 6: insert operations + destroy should not leak
subtest 'insert operations + destroy() no memory growth' => sub {
    plan tests => 1;
    my $iterations = 100;
    my $before = get_rss();
    for (1..$iterations) {
        my $list = Doubly::Linked->new();
        $list->add(1..3);
        $list->insert_at_start(0);
        $list->insert_at_end(4);
        $list->insert_at_pos(2, 1.5);
        $list->destroy();
    }
    my $after = get_rss();
    my $growth = $after - $before;
    ok($growth < 500, "Memory growth < 500KB after $iterations iterations (was ${growth}KB)");
};

# Helper to get resident set size in KB
sub get_rss {
    my $rss;

 view all matches for this distribution


Doubly

 view release on metacpan or  search on metacpan

lib/Doubly.pm  view on Meta::CPAN


	cmpthese $r;

Docker perl:5.38-threaded - Threaded environment (where only Doubly is truly safe):

	Benchmark: timing 10000 iterations of Doubly, Doubly::Linked, Doubly::Linked::PP, Doubly::Pointer...
	    Doubly: 0.704658 wallclock secs ( 0.70 usr +  0.00 sys =  0.70 CPU) @ 14285.71/s (n=10000)
	Doubly::Linked: 4.71918 wallclock secs ( 3.10 usr +  1.61 sys =  4.71 CPU) @ 2123.14/s (n=10000)
	Doubly::Linked::PP: 12.1816 wallclock secs (10.76 usr +  1.39 sys = 12.15 CPU) @ 823.05/s (n=10000)
	Doubly::Pointer: 0.778561 wallclock secs ( 0.77 usr +  0.00 sys =  0.77 CPU) @ 12987.01/s (n=10000)
			      Rate Doubly::Linked::PP Doubly::Linked Doubly::Pointer Doubly

lib/Doubly.pm  view on Meta::CPAN

	Doubly::Pointer    12987/s              1478%           512%              --    -9%
	Doubly             14286/s              1636%           573%             10%     --

Docker perl:5.38 - None threaded environment:

	Benchmark: timing 10000 iterations of Doubly, Doubly::Linked, Doubly::Linked::PP, Doubly::Pointer...
	    Doubly: 0.712633 wallclock secs ( 0.70 usr +  0.01 sys =  0.71 CPU) @ 14084.51/s (n=10000)
	Doubly::Linked: 16.0794 wallclock secs ( 4.05 usr +  5.75 sys =  9.80 CPU) @ 1020.41/s (n=10000)
	Doubly::Linked::PP: 13.0293 wallclock secs (11.73 usr +  1.27 sys = 13.00 CPU) @ 769.23/s (n=10000)
	Doubly::Pointer: 0.775681 wallclock secs ( 0.77 usr +  0.00 sys =  0.77 CPU) @ 12987.01/s (n=10000)
			      Rate Doubly::Linked::PP Doubly::Linked Doubly::Pointer Doubly

 view all matches for this distribution


Dreamhack-Solitaire-Medici

 view release on metacpan or  search on metacpan

lib/Dreamhack/Solitaire/Medici.pm  view on Meta::CPAN

our $VERSION = "0.01";

sub process {
    my ($self, %args) = @_;

    my $imax = (exists $args{'attempts'}) && ($args{'attempts'} =~ m/^[1-9]\d*$/) ? $args{'attempts'} : $self->_iterations(1+$#{$self->{'leftcards'}});

    for my $i (1..$imax) {

        my @layout = $self->add_rnd_layout();
        my @save = @layout;

lib/Dreamhack/Solitaire/Medici.pm  view on Meta::CPAN

        return @work
    }
    return @work
}

sub _iterations {
    my ($self, $cardscount) = @_;

    my $imax = 0;
    if ($cardscount <= 1) {
        $imax = 1;

 view all matches for this distribution


Dumbbench

 view release on metacpan or  search on metacpan

lib/Benchmark/Dumb.pm  view on Meta::CPAN

benchmark should be run exactly C<$count> times. A negative value
indicated that the code should be run until C<$count> seconds of
cumulated run-time have elapsed.

With C<Benchmark::Dumb>, we can do better. A positive integer
specifies the I<minimum> number of iterations. C<Dumbbench> may choose
to run more iterations to arrive at the necessary precision.

Specifying a certain target run-time (via a negative number for C<$count>)
may seem like a tempting idea, but if you care at all about the precision
of your result, it's quite useless.
B<This usage is not supported by C<Benchmark::Dumb>!>

lib/Benchmark/Dumb.pm  view on Meta::CPAN


I'm quoting the C<Benchmark> documentation liberally.

=head2 timethis(COUNT, CODE, [TITLE, [STYLE]])

Time I<COUNT> iterations of I<CODE>. I<CODE> may be a string to eval
or a code reference. Unlike with the original C<Benchmark>,
the code will B<not> run in the caller's package. Results will be printed
to C<STDOUT> as I<TITLE> followed by the C<timestr()>.
I<TITLE> defaults to C<"timethis COUNT"> if none is provided.

 view all matches for this distribution


DynGig-Automata

 view release on metacpan or  search on metacpan

lib/DynGig/Automata/Sequence.pm  view on Meta::CPAN

 };

=head1 MODE

In I<serial> mode, I<target> code must have an exhaustive batching behavior.
e.g.  n targets T1 .. Tn into k batches in k iterations of I<target> code

  ITERATION        TARGET
  =========        ======
  1                T1, T2 .. Tm
  2                Tm+1 ..

 view all matches for this distribution


DynGig-Util

 view release on metacpan or  search on metacpan

lib/DynGig/Util/CLI.pm  view on Meta::CPAN

 my %o = ( s => 30, link => 'current' );

 my $menu = DynGig::Util::CLI->new
 (
     'h|help',"print help menu",
     's|sleep=i',"[ $o{s} ] seconds between iterations",
     'link=s',"[ $o{link} ] symlink to current config",
     'server=s','server host:port',
 );

 my @option = $menu->option();

 view all matches for this distribution


EMDIS-ECS

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


Version 0.05, 2004-01-19
========================
- minor adjustments to POD documentation
- improve error messages generated by ecs_proc_meta script
- limit number of iterations through email inbox performed by scan_mail()
  subroutine of ecs_scan_mail script

Version 0.06, 2004-03-02
========================
- ecstool: modify --meta option, adding capability to generate a series of

 view all matches for this distribution


ETLp

 view release on metacpan or  search on metacpan

web/javascript/unittest.js  view on Meta::CPAN

    }.bind(this)) && this.pass();
  },
  assertElementMatches: function(element, expression) {
    this.assertElementsMatch([element], expression);
  },
  benchmark: function(operation, iterations) {
    var startAt = new Date();
    (iterations || 1).times(operation);
    var timeTaken = ((new Date())-startAt);
    this.info((arguments[2] || 'Operation') + ' finished ' + 
       iterations + ' iterations in ' + (timeTaken/1000)+'s' );
    return timeTaken;
  },
  _isVisible: function(element) {
    element = $(element);
    if(!element.parentNode) return true;

web/javascript/unittest.js  view on Meta::CPAN

    this.assert(!this._isVisible(element), Test.Unit.inspect(element) + " was not hidden and didn't have a hidden parent either. " + ("" || arguments[1]));
  },
  assertVisible: function(element) {
    this.assert(this._isVisible(element), Test.Unit.inspect(element) + " was not visible. " + ("" || arguments[1]));
  },
  benchmark: function(operation, iterations) {
    var startAt = new Date();
    (iterations || 1).times(operation);
    var timeTaken = ((new Date())-startAt);
    this.info((arguments[2] || 'Operation') + ' finished ' + 
       iterations + ' iterations in ' + (timeTaken/1000)+'s' );
    return timeTaken;
  }
};

Test.Unit.Testcase = Class.create();

 view all matches for this distribution


EV-Etcd

 view release on metacpan or  search on metacpan

bench.pl  view on Meta::CPAN

my $client = EV::Etcd->new(
    endpoints => ['127.0.0.1:2379'],
);

my $prefix = "/bench_$$";
my $iterations = $ENV{BENCH_ITER} || 1000;

print "EV::Etcd Benchmark\n";
print "==================\n\n";

# Benchmark 1: Sequential puts
{
    print "1. Sequential PUTs ($iterations iterations)...\n";
    my $completed = 0;
    my $start = time();

    for my $i (1..$iterations) {
        $client->put("$prefix/key$i", "value$i", sub {
            my ($resp, $err) = @_;
            die "PUT error: $err->{message}" if $err;
            $completed++;
            EV::break;

bench.pl  view on Meta::CPAN

        EV::run;
    }

    my $elapsed = time() - $start;
    printf "   Time: %.3f sec, Rate: %.0f ops/sec, Latency: %.2f ms/op\n\n",
        $elapsed, $iterations / $elapsed, ($elapsed / $iterations) * 1000;
}

# Benchmark 2: Sequential gets
{
    print "2. Sequential GETs ($iterations iterations)...\n";
    my $completed = 0;
    my $start = time();

    for my $i (1..$iterations) {
        $client->get("$prefix/key$i", sub {
            my ($resp, $err) = @_;
            die "GET error: $err->{message}" if $err;
            $completed++;
            EV::break;

bench.pl  view on Meta::CPAN

        EV::run;
    }

    my $elapsed = time() - $start;
    printf "   Time: %.3f sec, Rate: %.0f ops/sec, Latency: %.2f ms/op\n\n",
        $elapsed, $iterations / $elapsed, ($elapsed / $iterations) * 1000;
}

# Benchmark 3: Pipelined puts (bounded concurrency)
{
    my $concurrency = $ENV{BENCH_CONCURRENCY} || 100;
    print "3. Pipelined PUTs ($iterations iterations, concurrency=$concurrency)...\n";
    my $completed = 0;
    my $sent = 0;
    my $in_flight = 0;
    my $start = time();

    my $send_batch; $send_batch = sub {
        while ($sent < $iterations && $in_flight < $concurrency) {
            $sent++;
            $in_flight++;
            my $i = $sent;
            $client->put("$prefix/pipe$i", "value$i", sub {
                my ($resp, $err) = @_;
                die "PUT error: $err->{message}" if $err;
                $completed++;
                $in_flight--;
                if ($completed == $iterations) {
                    EV::break;
                } else {
                    $send_batch->();
                }
            });

bench.pl  view on Meta::CPAN

    $send_batch->();
    EV::run;

    my $elapsed = time() - $start;
    printf "   Time: %.3f sec, Rate: %.0f ops/sec, Latency: %.2f ms/op\n\n",
        $elapsed, $iterations / $elapsed, ($elapsed / $iterations) * 1000;
}

# Benchmark 4: Pipelined gets (bounded concurrency)
{
    my $concurrency = $ENV{BENCH_CONCURRENCY} || 100;
    print "4. Pipelined GETs ($iterations iterations, concurrency=$concurrency)...\n";
    my $completed = 0;
    my $sent = 0;
    my $in_flight = 0;
    my $start = time();

    my $send_batch; $send_batch = sub {
        while ($sent < $iterations && $in_flight < $concurrency) {
            $sent++;
            $in_flight++;
            my $i = $sent;
            $client->get("$prefix/pipe$i", sub {
                my ($resp, $err) = @_;
                die "GET error: $err->{message}" if $err;
                $completed++;
                $in_flight--;
                if ($completed == $iterations) {
                    EV::break;
                } else {
                    $send_batch->();
                }
            });

bench.pl  view on Meta::CPAN

    $send_batch->();
    EV::run;

    my $elapsed = time() - $start;
    printf "   Time: %.3f sec, Rate: %.0f ops/sec, Latency: %.2f ms/op\n\n",
        $elapsed, $iterations / $elapsed, ($elapsed / $iterations) * 1000;
}

# Benchmark 5: Watch latency
{
    print "5. Watch event latency (100 events)...\n";

 view all matches for this distribution


EV-Future

 view release on metacpan or  search on metacpan

bench/benchmark.pl  view on Meta::CPAN

    my $end = time;
    my $elapsed = $end - $start;
    printf "%-30s: %8.4fs (%10.2f/s)\n", $name, $elapsed, $ITERATIONS / $elapsed;
}

print "Benchmarking $COUNT synchronous tasks over $ITERATIONS iterations:\n";

run_bench('EV::Future::parallel', sub {
    EV::Future::parallel(\@tasks, sub { });
});

 view all matches for this distribution


EV-Kafka

 view release on metacpan or  search on metacpan

src/EV__Kafka.xs  view on Meta::CPAN

    }

#ifdef HAVE_OPENSSL
    /* SCRAM multi-step handling */
    if (self->sasl_mechanism && self->scram_step == SCRAM_STEP_CLIENT_FIRST && auth_data) {
        /* Server-first-message: r=<nonce>,s=<salt>,i=<iterations> */
        /* Parse server response, compute proof, send client-final */
        const char *server_nonce = NULL;
        size_t server_nonce_len = 0;
        const char *salt_b64 = NULL;
        size_t salt_b64_len = 0;
        int iterations = 0;
        {
            const char *sp = auth_data;
            const char *se = auth_data + auth_data_len;
            while (sp < se) {
                if (sp + 2 <= se && sp[0] == 'r' && sp[1] == '=') {

src/EV__Kafka.xs  view on Meta::CPAN

                    sp += 2; salt_b64 = sp;
                    while (sp < se && *sp != ',') sp++;
                    salt_b64_len = sp - salt_b64;
                } else if (sp + 2 <= se && sp[0] == 'i' && sp[1] == '=') {
                    sp += 2;
                    iterations = atoi(sp);
                    while (sp < se && *sp != ',') sp++;
                }
                if (sp < se && *sp == ',') sp++;
                else sp++;
            }
        }

        if (!server_nonce || !salt_b64 || iterations <= 0 || iterations > 1048576) {
            conn_emit_error(aTHX_ self, "SCRAM: malformed server-first-message");
            if (conn_check_destroyed(self)) return;
            conn_handle_disconnect(aTHX_ self, "SCRAM auth failed");
            return;
        }

src/EV__Kafka.xs  view on Meta::CPAN

                conn_handle_disconnect(aTHX_ self, "SCRAM auth failed");
                return;
            }
        }

        /* SaltedPassword = Hi(password, salt, iterations) using PBKDF2 */
        unsigned char salted_password[64];
        PKCS5_PBKDF2_HMAC(self->sasl_password, strlen(self->sasl_password),
            salt, salt_len, iterations, md, digest_len, salted_password);

        /* ClientKey = HMAC(SaltedPassword, "Client Key") */
        unsigned char client_key[64];
        unsigned int ck_len = digest_len;
        HMAC(md, salted_password, digest_len,

 view all matches for this distribution


EV-Loop-Async

 view release on metacpan or  search on metacpan

Async.pm  view on Meta::CPAN

value of C<1> means that, after handling the pending events, it will call
C<< $loop->loop (EV::LOOP_NONBLOCK) >> and handle the resulting events, if
any. A value of C<2> means that this will be iterated twice.

When a foreground event poll does not yield any new events, then no
further iterations will be made, so this is only a I<maximum> value of
additional loop runs.

Take also note of the standard EV C<set_io_collect_interval>
functionality, which can achieve a similar, but different, effect - YMMV.

 view all matches for this distribution


EV-MariaDB

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    - Fix escape, query_stream, stmt lifecycle, state caching
    - Benchmark fixes and EV::Future integration

0.02  2026-03-15
    - Fix: clear $@ (ERRSV) after G_EVAL callbacks to prevent pollution
      across async event loop iterations
    - Fix: query_stream on non-SELECT (DML) now delivers EOF instead of
      a false error
    - Fix: copy error string in stream_error before invoking callback
    - Add fork detection via PID check at all operation entry points
    - Add CLONE_SKIP to prevent unsafe ithread cloning

 view all matches for this distribution


EV-Redis

 view release on metacpan or  search on metacpan

t/flow_control.t  view on Meta::CPAN

    is $results[1][2], 'disconnected', 'cmd2 got disconnect error';

    $r->max_pending(0);
}

# Edge case: reconnect after disconnect (separate event loop iterations)
{
    $r->connect_unix( $connect_info{sock} );

    my @results;

 view all matches for this distribution


EV-Websockets

 view release on metacpan or  search on metacpan

bench/latency.pl  view on Meta::CPAN

use EV::Websockets;
use Time::HiRes qw(time);

# Benchmark: Latency (Connection + Handshake time)

my $iterations = 50;

sub bench_ev_websockets {
    print "Benchmarking EV::Websockets Latency ($iterations iterations)...\n";
    my $ctx = EV::Websockets::Context->new();
    my %srv_conns;
    my $port = $ctx->listen(
        port => 0,
        on_connect => sub { $srv_conns{$_[0]} = $_[0] },
        on_close => sub { delete $srv_conns{$_[0]} },
    );
    my @latencies;

    for (1..$iterations) {
        my $start = time;
        my $c; $c = $ctx->connect(
            url => "ws://127.0.0.1:$port",
            on_connect => sub {
                push @latencies, time - $start;

bench/latency.pl  view on Meta::CPAN

    printf "  Average Latency: %.4f ms\n\n", $avg * 1000;
    return $avg;
}

sub bench_ae_ws_client {
    print "Benchmarking AnyEvent::WebSocket::Client Latency ($iterations iterations)...\n";
    my $ctx = EV::Websockets::Context->new();
    my %srv_conns;
    my $port = $ctx->listen(
        port => 0,
        on_connect => sub { $srv_conns{$_[0]} = $_[0] },
        on_close => sub { delete $srv_conns{$_[0]} },
    );
    
    my @latencies;

    for (1..$iterations) {
        my $client = AnyEvent::WebSocket::Client->new;
        my $start = time;
        $client->connect("ws://127.0.0.1:$port")->cb(sub {
            my $conn = eval { shift->recv };
            push @latencies, time - $start;

 view all matches for this distribution


EV-cares

 view release on metacpan or  search on metacpan

eg/upstream_ad_check.pl  view on Meta::CPAN

printf "Querying %s for an A record on %d resolver(s)\n\n", $name, scalar @servers;
printf "%-20s %-7s %-7s %-7s %s\n", 'server', 'rcode', 'ad', 'ra', 'note';
printf "%s\n", '-' x 60;

my $pending = scalar @servers;
my @resolvers;   # keep resolvers alive across the for loop iterations;
                 # otherwise each $r drops to refcount 0 at end-of-iter,
                 # DESTROY runs ares_destroy, and every callback fires
                 # with ARES_EDESTRUCTION before we ever pump EV::run.
for my $srv (@servers) {
    my $r = EV::cares->new(servers => [$srv], flags => $flags, timeout => 5);

 view all matches for this distribution


EV

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - (libev) many bugfixes in linuxaio backend.
        - (libev) experimental io uring interface.
          reminding me to actually release the fix.
	- try to name ev.h more explicitly, to hopefully improve portability.
        - opportunistically round up wait times for poll and epoll backend,
          to avoid unnecessary loop iterations.
        - add build dependency on ev_linuxaio.c.
        - quickly (re)-ported to minix 3.3 before minix crashed again.

4.27 Thu Jun 27 09:39:58 CEST 2019
	- (libev) completely rewritten linuxaio backend, maybe

 view all matches for this distribution


( run in 3.040 seconds using v1.01-cache-2.11-cpan-f03e8824b8d )