view release on metacpan or search on metacpan
lib/CPAN/Audit/DB.pm view on Meta::CPAN
use warnings;
our $VERSION = '20260811.001';
sub db {
{"dists" => {"ActivePerl" => {"advisories" => [{"affected_versions" => ["==5.16.1.1601"],"cves" => ["CVE-2012-5377"],"description" => "Untrusted search path vulnerability in the installation functionality in ActivePerl 5.16.1.1601, when installed in...
}
__PACKAGE__;
view all matches for this distribution
view release on metacpan or search on metacpan
src/catch.hpp view on Meta::CPAN
class BenchmarkLooper {
std::string m_name;
std::size_t m_count = 0;
std::size_t m_iterationsToRun = 1;
uint64_t m_resolution;
Timer m_timer;
static auto getResolution() -> uint64_t;
public:
src/catch.hpp view on Meta::CPAN
reportStart();
m_timer.start();
}
explicit operator bool() {
if( m_count < m_iterationsToRun )
return true;
return needsMoreIterations();
}
void increment() {
src/catch.hpp view on Meta::CPAN
struct BenchmarkInfo {
std::string name;
};
struct BenchmarkStats {
BenchmarkInfo info;
std::size_t iterations;
uint64_t elapsedTimeInNanoseconds;
};
struct IStreamingReporter {
virtual ~IStreamingReporter() = default;
src/catch.hpp view on Meta::CPAN
getResultCapture().benchmarkStarting( { m_name } );
}
auto BenchmarkLooper::needsMoreIterations() -> bool {
auto elapsed = m_timer.getElapsedNanoseconds();
// Exponentially increasing iterations until we're confident in our timer resolution
if( elapsed < m_resolution ) {
m_iterationsToRun *= 10;
return true;
}
getResultCapture().benchmarkEnded( { { m_name }, m_count, elapsed } );
return false;
src/catch.hpp view on Meta::CPAN
}
namespace {
auto estimateClockResolution() -> uint64_t {
uint64_t sum = 0;
static const uint64_t iterations = 1000000;
auto startTime = getCurrentNanosecondsSinceEpoch();
for( std::size_t i = 0; i < iterations; ++i ) {
uint64_t ticks;
uint64_t baseTicks = getCurrentNanosecondsSinceEpoch();
do {
ticks = getCurrentNanosecondsSinceEpoch();
src/catch.hpp view on Meta::CPAN
return sum / i;
}
}
// We're just taking the mean, here. To do better we could take the std. dev and exclude outliers
// - and potentially do more iterations if there's a high variance.
return sum/iterations;
}
}
auto getEstimatedClockResolution() -> uint64_t {
static auto s_resolution = estimateClockResolution();
return s_resolution;
src/catch.hpp view on Meta::CPAN
(*m_tablePrinter) << line << ColumnBreak();
}
}
void ConsoleReporter::benchmarkEnded(BenchmarkStats const& stats) {
Duration average(stats.elapsedTimeInNanoseconds / stats.iterations);
(*m_tablePrinter)
<< stats.iterations << ColumnBreak()
<< stats.elapsedTimeInNanoseconds << ColumnBreak()
<< average << ColumnBreak();
}
void ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) {
view all matches for this distribution
view release on metacpan or search on metacpan
gkforeach( $gov, \@items, \&body, $k )
etc...
In this way, other governor objects can be constructed which have different
running properties; such as interleaving iterations of their loop with other
IO activity in an event-driven framework, or giving rate-limitation control on
the speed of iteration of the loop.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/zx48.asm view on Meta::CPAN
DEFB $C0 ;;st-mem-0 v+s.
DEFB $02 ;;delete .
DEFB $38 ;;end-calc
CALL L1DDA ; routine NEXT-LOOP tests against limit.
RET C ; return if no more iterations possible.
LD HL,($5C68) ; find start of variable contents from MEM.
LD DE,$000F ; add 3*5 to
ADD HL,DE ; address the looping line number
LD E,(HL) ; low byte to E
t/data/zx48.asm view on Meta::CPAN
; -----------------
; Perform NEXT loop
; -----------------
; This routine is called from the FOR command to test for an initial
; iteration and from the NEXT command to test for all subsequent iterations.
; the system variable MEM addresses the variable's contents which, in the
; latter case, have had the step, possibly negative, added to the value.
;; NEXT-LOOP
L1DDA: RST 28H ;; FP-CALC
t/data/zx48.asm view on Meta::CPAN
;; NEXT-1
L1DE2: DEFB $03 ;;subtract l-v OR v-l.
DEFB $37 ;;greater-0 (1/0)
DEFB $00 ;;jump-true .
DEFB $04 ;;to L1DE9, NEXT-2 if no more iterations.
DEFB $38 ;;end-calc .
AND A ; clear carry flag signalling another loop.
RET ; return
t/data/zx48.asm view on Meta::CPAN
; The Spectrum uses Chebyshev polynomials to generate approximations for
; SIN, ATN, LN and EXP. These are named after the Russian mathematician
; Pafnuty Chebyshev, born in 1821, who did much pioneering work on numerical
; series. As far as calculators are concerned, Chebyshev polynomials have an
; advantage over other series, for example the Taylor series, as they can
; reach an approximation in just six iterations for SIN, eight for EXP and
; twelve for LN and ATN. The mechanics of the routine are interesting but
; for full treatment of how these are generated with demonstrations in
; Sinclair BASIC see "The Complete Spectrum ROM Disassembly" by Dr Ian Logan
; and Dr Frank O'Hara, published 1983 by Melbourne House.
view all matches for this distribution
view release on metacpan or search on metacpan
xt/author/leaks-xs.t view on Meta::CPAN
# Sanity check: minify() of the test CSS returns nothing (as it was all
# minified away).
is minify($css), undef, 'minify() of empty CSS returns undef';
###############################################################################
# Warm things up. Runs a handful of iterations so that our memory allocator
# can reach a steady state.
minify($css) for (1 .. $ITERS_WARMUP);
###############################################################################
# Measure RSS growth over repeated calls to the minifier. If the XS code is
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CTK/Skel/Daemon.pm view on Meta::CPAN
use base qw/CTK::Daemon/;
use constant {
FORKS => 1,
INTERVAL=> 1,
MAXITER => 10, # 10 iterations max
};
sub new {
my $class = shift;
my $name = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CWB/CQP/More/Iterator.pm view on Meta::CPAN
iterator.
=head2 C<forward>
Forwards the iterator the offset specified. If the offset is too big
(as in, more iterations than the size of the iterator) the iterator is
set to the last element. It also supports negative offsets (but please
use the C<backward> method).
The new position index is returned.
=head2 C<backward>
Backwards the iterator the offset specified. If the offset is too big
(as in, more iterations than the current position of the iterator) the
iterator is set to the first element. It also supports negative offsets
(but please use the C<forward> method).
The new position index is returned.
view all matches for this distribution
view release on metacpan or search on metacpan
t/03-lock-env.t view on Meta::CPAN
use Test::More skip_all => "need to deal with forking tests";
use Cache::BDB;
use strict;
my $kids = 5; # number of children to spawn
my $iterations = 1; # number of times each kid should do its thing
my $rows = 10; # number of rows each child should write, then read
my %options1 = (
cache_root => './t/03',
cache_file => "two.db",
t/03-lock-env.t view on Meta::CPAN
my $t0 = [gettimeofday];
my $c1 = Cache::BDB->new(%options1);
my $c2 = Cache::BDB->new(%options2);
for (0 .. $iterations) {
for (my $j = 1; $j <= $rows; $j++) {
my $r = $j x 4;
my $rv1 = $c1->set($j, { $j => $r} );
diag("$$ faild to write $j => $r") if $rv1;
view all matches for this distribution
view release on metacpan or search on metacpan
script/benchmark.pl view on Meta::CPAN
die <<HELP unless @ARGV;
Usage: $FindBin::Script HOST:PORT... [COUNT] ["compare"]
HOST:PORT... - list of memcached server addresses.
COUNT - number of iterations (default ${\default_iteration_count})
(each iteration will process ${\key_count} keys).
"compare" - literal string to enable comparison with
Cache::Memcached.
HELP
script/benchmark.pl view on Meta::CPAN
}
sub bench_finalize {
my ( $title, $code, $finalize ) = @_;
say "Benchmark: timing $count iterations of $title...";
my $b1 = timeit( $count, $code );
# We call nowait_push here. Otherwise the time of gathering
# the results would be added to the following commands.
my $b2 = timeit( 1, $finalize );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Carp/Capture.pm view on Meta::CPAN
#
# There are two other reasons, besides binary avoidance at the user-level,
# for mapping packstrings with the Callstacks hash. Repeated callstacks
# happen whenever capturing is requested from a loop. By mapping callstacks
# we only have to store a repeated callstack once. We can also help the user
# identify loop iterations by offering storage for an 'annotation' value.
#
# If the user provides an annotation then we will need to save a copy of it,
# which we do pushing it onto an array - the 'annotations' attribute. The
# index of the new element becomes the annotation's id.
#
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Carrot/Diversity/Block_Modifiers/Plugin/While/Fatal_Limit.pm view on Meta::CPAN
package Carrot::Diversity::Block_Modifiers::Plugin::While::Fatal_Limit
# /type class
# /implements [=component_pkg=]::_Prototype
# /capability "Limits the maximum number of iterations in while loops."
{
use strict;
use warnings 'FATAL' => 'all';
BEGIN {
view all matches for this distribution
view release on metacpan or search on metacpan
gctpc/alconinv.c view on Meta::CPAN
yp = yp + dyp;
ds = fabs(dxp) + fabs(dyp);
nn++;
if (nn > 20)
{
p_error("Too many iterations in inverse","alcon-inv");
return(235);
}
}
while (ds > EPSLN);
gctpc/alconinv.c view on Meta::CPAN
pow(((1.0 + esphi) / (1.0 - esphi)),(e / 2.0))) - HALF_PI - phi;
phi += dphi;
nn++;
if (nn > 20)
{
p_error("Too many iterations in inverse","alcon-inv");
return(236);
}
}
while(fabs(dphi) > EPSLN);
view all matches for this distribution
view release on metacpan or search on metacpan
ex/rails4_cookie_to_json.rb view on Meta::CPAN
# Default values for Rails 4 apps
key_iter_num = 1000
key_size = 32
salt = "encrypted cookie"
signed_salt = "signed encrypted cookie"
key_generator = ActiveSupport::KeyGenerator.new(key, iterations: key_iter_num)
secret = key_generator.generate_key(salt)[0..key_size-1]
sign_secret = key_generator.generate_key(signed_salt)
@encryptor = ActiveSupport::MessageEncryptor.new(secret, sign_secret, serializer: ActiveSupport::MessageEncryptor::NullSerializer)
end
view all matches for this distribution
view release on metacpan or search on metacpan
ex/rails4_cookie_to_json.rb view on Meta::CPAN
# Default values for Rails 4 apps
key_iter_num = 1000
key_size = 32
salt = "encrypted cookie"
signed_salt = "signed encrypted cookie"
key_generator = ActiveSupport::KeyGenerator.new(key, iterations: key_iter_num)
secret = key_generator.generate_key(salt)[0..key_size-1]
sign_secret = key_generator.generate_key(signed_salt)
@encryptor = ActiveSupport::MessageEncryptor.new(secret, sign_secret, serializer: ActiveSupport::MessageEncryptor::NullSerializer)
end
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/Upgrading.pod view on Meta::CPAN
No upgrade is needed if your myapp_fastcgi.pl script is already upgraded
to use L<Catalyst::Script::FastCGI>.
=head2 Upgrading the mod_perl / Apache Engines
The engines that are built upon the various iterations of mod_perl,
L<Catalyst::Engine::Apache::MP13> (for mod_perl 1, and Apache 1.x) and
L<Catalyst::Engine::Apache2::MP20> (for mod_perl 2, and Apache 2.x),
should be seamless upgrades and will work using L<Plack::Handler::Apache1>
or L<Plack::Handler::Apache2> as required.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/Crudite/Util/Random.pm view on Meta::CPAN
alligator
alligators
Allis
Allison
alliteration
alliterations
alliterative
allocatable
allocate
allocated
allocates
lib/CatalystX/Crudite/Util/Random.pm view on Meta::CPAN
iterate
iterated
iterates
iterating
iteration
iterations
iterative
iteratively
iterator
iterators
Ithaca
view all matches for this distribution
view release on metacpan or search on metacpan
root/static/js/yui/build/datatable/datatable-beta-min.js view on Meta::CPAN
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.0
*/
YAHOO.util.Chain=function(){this.q=[].slice.call(arguments);};YAHOO.util.Chain.prototype={id:0,run:function(){var F=this.q[0],C;if(!F||this.id){return this;}C=F.method||F;if(typeof C==="function"){var E=F.scope||{},B=F.argument||[],A=F.timeout||0,D=t...
A.sortable=this.sortable;A.sortOptions=this.sortOptions;A.width=this.width;return A;},getKey:function(){return this.key;},getKeyIndex:function(){return this._nKeyIndex;},getTreeIndex:function(){return this._nTreeIndex;},getParent:function(){return th...
if(A instanceof YAHOO.widget.Record){for(B=0;B<this._records.length;B++){if(this._records[B]&&(this._records[B]._sId===A._sId)){return A;}}}else{if(YAHOO.lang.isNumber(A)){if((A>-1)&&(A<this.getLength())){return this._records[A];}}else{if(YAHOO.lang....
this.setAttributeConfig("id",{value:YAHOO.widget.Paginator.id++,readOnly:true});this.setAttributeConfig("rendered",{value:false,readOnly:true});},initUIComponents:function(){var C=YAHOO.widget.Paginator.ui;for(var B in C){var A=C[B];if(YAHOO.lang.isO...
D.subscribe("recordOffsetChange",this.update,this,true);D.subscribe("beforeDestroy",this.destroy,this,true);D.subscribe("firstPageLinkLabelChange",this.update,this,true);D.subscribe("firstPageLinkClassChange",this.update,this,true);};B.FirstPageLink....
this.link.href="#";this.link.className=H;this.link.innerHTML=D;YAHOO.util.Event.on(this.link,"click",this.onClick,this,true);this.span.id=E+"-next-span";this.span.className=H;this.span.innerHTML=D;this.current=G.getCurrentPage()===F?this.span:this.li...
root/static/js/yui/build/datatable/datatable-beta-min.js view on Meta::CPAN
C.extend(G,F.Element,{initAttributes:function(J){J=J||{};G.superclass.initAttributes.call(this,J);this.setAttributeConfig("summary",{value:null,validator:C.isString,method:function(K){this._elThead.parentNode.summary=K;}});this.setAttributeConfig("se...
}else{if(J.removeAllRanges){J.removeAllRanges();}else{if(J.collapse){J.collapse();}}}}},_focusEl:function(J){J=J||this._elTbody;setTimeout(function(){try{J.focus();}catch(K){}},0);},_syncColWidths:function(){var R=this._oColumnSet.keys,J=this.getFirs...
this._elThead=a;M=this._elTbodyContainer.firstChild.appendChild(document.createElement("thead"));this._elA11yThead=M;P=[a,M];I.addListener(a,"focus",this._onTheadFocus,this);I.addListener(a,"keydown",this._onTheadKeydown,this);I.addListener(a,"mouseo...
K.cancelCellEditor();}var M=I.getTarget(L);var J=M.nodeName.toLowerCase();K.fireEvent("tableScrollEvent",{event:L,target:M});},_onDocumentClick:function(L,K){var M=I.getTarget(L);var J=M.nodeName.toLowerCase();if(!D.isAncestor(K._elContainer,M)){K.fi...
}var N=I.getTarget(M);var J=N.nodeName.toLowerCase();var L=true;while(N&&(J!="table")){switch(J){case"body":return ;case"input":if(N.type.toLowerCase()=="checkbox"){L=K.fireEvent("theadCheckboxClickEvent",{target:N,event:M});}else{if(N.type.toLowerCa...
}}return null;},initializeTable:function(){this._bInit=true;this._oRecordSet.reset();this._unselectAllTrEls();this._unselectAllTdEls();this._aSelections=null;this._oAnchorRecord=null;this._oAnchorCell=null;},render:function(){this._oChain.stop();this...
var J=false;var M=this.get("sortedBy");if(M&&(M.key===L.key)){J=true;if(M.dir){K=(M.dir==G.CLASS_ASC)?G.CLASS_DESC:G.CLASS_ASC;}else{K=(K==G.CLASS_ASC)?G.CLASS_DESC:G.CLASS_ASC;}}return K;},sortColumn:function(O,M){if(O&&(O instanceof YAHOO.widget.Co...
J.run();this.fireEvent("columnUnselectEvent",{column:L});}else{}}},getSelectedColumns:function(N){var K=[];var L=this._oColumnSet.keys;for(var M=0,J=L.length;M<J;M++){if(L[M].selected){K[K.length]=L[M];}}return K;},highlightColumn:function(K){var M=t...
if(!P){return null;}else{J=this.getRecord(P.recordId);K=this.getRecordIndex(J);O=this.getTrEl(J);N=this.getTrIndex(O);if(N===null){return null;}else{L.record=J;L.recordIndex=K;L.el=this.getTdEl(P);L.trIndex=N;L.column=this.getColumnById(P.columnId);L...
}}}}}else{this._oAnchorCell=O;this.selectCell(O);}}else{if(L){this._oAnchorCell=O;if(this.isSelected(O)){this.unselectCell(O);}else{this.selectCell(O);}}else{this._handleSingleCellSelectionByMouse(Z);}}}}},_handleCellBlockSelectionByKey:function(O){v...
}if(L){for(K=M.cells.length-1;K>S.colKeyIndex;K--){this.unselectCell(L.cells[K]);}}}}else{if(J==39){L=this.getNextTrEl(S.el);if(Q.recordIndex<S.recordIndex){if(S.colKeyIndex<M.cells.length-1){P=M.cells[S.colKeyIndex+1];this.selectCell(P);}else{if(L){...
J--){if(K[J].recordId&&K[J].columnId){return K[J];}}}},highlightRow:function(L){var J=this.getTrEl(L);if(J){var K=this.getRecord(J);D.addClass(J,G.CLASS_HIGHLIGHTED);this.fireEvent("rowHighlightEvent",{record:K,el:J});return ;}},unhighlightRow:functi...
},onDataReturnAppendRows:function(K,L,M){this.fireEvent("dataReturnEvent",{request:K,response:L,payload:M});var J=this.doBeforeLoadData(K,L,M);if(J&&L&&!L.error&&C.isArray(L.results)){this.addRows(L.results);this._handleDataReturnPayload(K,L,M);}else...
view all matches for this distribution
view release on metacpan or search on metacpan
t/Catmandu-IterableOnce.t view on Meta::CPAN
}
my $iter = T::IterableOnce->new;
is_deeply $iter->to_array, [1, 2, 3], 'first iteration gives results';
is_deeply $iter->to_array, [], 'repeated iterations give no results';
done_testing;
view all matches for this distribution
view release on metacpan or search on metacpan
src/SpookyV2.h view on Meta::CPAN
// with probability 50 +- .3%
// For every pair of input bits,
// with probability 50 +- 3%
//
// This does not rely on the last Mix() call having already mixed some.
// Two iterations was almost good enough for a 64-bit result, but a
// 128-bit result is reported, so End() does three iterations.
//
static INLINE void EndPartial(
uint64 &h0, uint64 &h1, uint64 &h2, uint64 &h3,
uint64 &h4, uint64 &h5, uint64 &h6, uint64 &h7,
uint64 &h8, uint64 &h9, uint64 &h10,uint64 &h11)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chandra/HotReload.pm view on Meta::CPAN
Register paths (files or directories) to watch along with callbacks
that are invoked whenever a change is detected.
When integrated with L<Chandra::App> via C<< $app->watch() >>, the
event loop automatically switches to non-blocking mode and polls for
file changes between iterations.
=head1 METHODS
=head2 new(%args)
view all matches for this distribution
view release on metacpan or search on metacpan
t/coderef-map.t view on Meta::CPAN
ok $died, q[die in callback propagates to caller];
like $@, qr/callback error/, q[original error message preserved];
}
{
note "code ref die does not leak memory (no crash after many iterations)";
my @map = fresh_map();
$map[ ord('a') ] = sub { die "leak test" };
for (1..1000) {
eval { Char::Replace::replace( "abc", \@map ) };
}
pass q[1000 die-in-callback iterations: no crash or corruption];
}
done_testing;
view all matches for this distribution
view release on metacpan or search on metacpan
share/plotly.js/plotly.min.js view on Meta::CPAN
* plotly.js v2.14.0
* Copyright 2012-2022, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self...
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
share/plotly.js/plotly.min.js view on Meta::CPAN
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
"use strict";var e=t("base64-js"),n=t("ieee754");r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50;function i(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=ne...
/*! Native Promise Only
v0.8.1 (c) Kyle Simpson
MIT License: http://getify.mit-license.org
*/
!function(t,r,n){r[t]=r[t]||n(),void 0!==e&&e.exports&&(e.exports=r[t])}("Promise",void 0!==t?t:this,(function(){"use strict";var t,e,n,i=Object.prototype.toString,a=void 0!==r?function(t){return r(t)}:setTimeout;try{Object.defineProperty({},"x",{}),...
share/plotly.js/plotly.min.js view on Meta::CPAN
/*
* @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
* @license MIT
* @preserve Project Home: https://github.com/voidqk/polybooljs
*/
var n,i=t("./lib/build-log"),a=t("./lib/epsilon"),o=t("./lib/intersecter"),s=t("./lib/segment-chainer"),l=t("./lib/segment-selector"),c=t("./lib/geojson"),u=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.p...
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chess/Plisco/Engine/Win32Wrapper.pm view on Meta::CPAN
my $time_left = $params->{mytime} + $params->{movestogo} * $params->{myinc};
# FIXME! This should not be fixed_time but have a better name.
# FIXME! Depending on the volatility of the position, there should be
# a time cushion that can be used if the evaluation changes a lot between
# iterations.
$tree->{allocated_time} = int (0.5 + $time_left / $mtg);
}
sub movesToGo {
my ($self) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
-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
view release on metacpan or search on metacpan
lib/Chorus/Expert.pm view on Meta::CPAN
An agent tagged with C<_LOCK_UNTIL_STABLE> is skipped when any earlier agent in
the current iteration has already succeeded (C<_SUCCES> is true). This allows
priority-based sequencing without explicit coupling.
If C<_MAX_ITER> full iterations complete without termination, a warning is emitted
and C<process()> returns C<undef>.
Returns C<1> if C<SOLVED>, C<undef> if C<FAILED> or if C<_MAX_ITER> is exceeded.
=head2 _LOCK_UNTIL_STABLE
lib/Chorus/Expert.pm view on Meta::CPAN
$board->set('INPUT', $input);
my $max_iter = $this->{_MAX_ITER} // DEFAULT_MAX_ITER;
my $iter = 0;
do {
if (++$iter > $max_iter) {
warn "Chorus::Expert - process() reached max iterations ($max_iter) without SOLVED or FAILED\n";
return;
}
my @processed = ();
for my $agent (@$agents) {
lib/Chorus/Expert.pm view on Meta::CPAN
direct assignment immediately after construction:
my $xprt = Chorus::Expert->new();
$xprt->{_MAX_ITER} = 50_000; # mandatory for long pipelines
The default is 10,000 iterations. For a pipeline of N frames à M total rules,
a safe heuristic is C<N Ã M Ã safety_margin> (typically Ã10).
Please report other bugs via the CPAN request tracker:
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Chorus>
view all matches for this distribution
view release on metacpan or search on metacpan
- Extra files from Apple 'make dist' causes issues on all
other OS's. Damn perl.org world-writeable issue with
Windows.
0.03 Thu May 4 14:10:40 2010
- Fixed bug in line_sessions(); too many for iterations.
- Fixed bug in interface_info(); if duplex not defined.
- Added option for /xx instead of dotted-octet format for
IP Mask in interface_ip().
- Updated error message details.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Accessor/Lazy.pm view on Meta::CPAN
Same as C<mk_ro_accessors>, but creating lazy ones.
=head1 BENCHMARKING
Accessors benchmark:
Benchmark: timing 20000000 iterations of Acessor, AcessorF, Direct, Lazy, LazyF...
Acessor: 12 wallclock secs (11.34 usr + 0.00 sys = 11.34 CPU) @ 1763512.92/s (n=20000000)
AcessorF: 6 wallclock secs ( 5.71 usr + 0.00 sys = 5.71 CPU) @ 3502626.97/s (n=20000000)
Direct: 1 wallclock secs ( 0.78 usr + 0.00 sys = 0.78 CPU) @ 25641025.64/s (n=20000000)
Lazy: 14 wallclock secs (13.85 usr + 0.00 sys = 13.85 CPU) @ 1443730.60/s (n=20000000)
LazyF: 9 wallclock secs ( 8.71 usr + 0.00 sys = 8.71 CPU) @ 2297530.16/s (n=20000000)
Mutators benchmark:
Benchmark: timing 20000000 iterations of Acessor, AcessorF, Direct, Lazy, LazyF...
Acessor: 16 wallclock secs (15.26 usr + 0.00 sys = 15.26 CPU) @ 1310959.62/s (n=20000000)
AcessorF: 8 wallclock secs ( 7.91 usr + 0.00 sys = 7.91 CPU) @ 2528764.70/s (n=20000000)
Direct: 2 wallclock secs ( 1.50 usr + 0.00 sys = 1.50 CPU) @ 13351134.85/s (n=20000000)
Lazy: 19 wallclock secs (18.83 usr + 0.00 sys = 18.83 CPU) @ 1062191.30/s (n=20000000)
LazyF: 9 wallclock secs (10.53 usr + 0.00 sys = 10.53 CPU) @ 1899335.23/s (n=20000000)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Delegator.pm view on Meta::CPAN
I whipped up a quick script to compare the performance of Class::Delegator to
Class::Delegation and a manually-installed delegation method (the control).
I'll let the numbers speak for themselves:
Benchmark: timing 1000000 iterations of Class::Delegation, Class::Delegator, Manually...
Class::Delegation: 106 wallclock secs (89.03 usr + 2.09 sys = 91.12 CPU) @ 10974.54/s (n=1000000)
Class::Delegator: 3 wallclock secs ( 3.44 usr + 0.02 sys = 3.46 CPU) @ 289017.34/s (n=1000000)
Control: 3 wallclock secs ( 3.01 usr + 0.02 sys = 3.03 CPU) @ 330033.00/s (n=1000000)
=head1 Bugs
view all matches for this distribution
view release on metacpan or search on metacpan
t/99-performance-regression.t view on Meta::CPAN
# Store individual timing results
my %timing_results;
sub run_highres_benchmark {
my ($code, $iterations) = @_;
$iterations ||= $ITERATIONS;
# Warm up
$code->() for 1..1000;
my $start = time();
$code->() for 1..$iterations;
my $end = time();
return $end - $start;
}
sub run_benchmarks {
my %results;
# Basic Object Creation
diag "\n=== Benchmarking Basic Object Creation ($ITERATIONS iterations) ===";
$timing_results{class_create} = run_highres_benchmark(sub {
Test::Performance::Class->new(name => 'test');
});
t/99-performance-regression.t view on Meta::CPAN
diag sprintf " Class: %.4f seconds", $timing_results{class_create};
diag sprintf " Class::More: %.4f seconds", $timing_results{class_more_create};
# Method Access
diag "\n=== Benchmarking Method Access ($ITERATIONS iterations) ===";
my $class_obj = Test::Performance::Class->new;
my $class_more_obj = Test::Performance::ClassMore->new;
$timing_results{class_access} = run_highres_benchmark(sub {
$class_obj->custom_method;
t/99-performance-regression.t view on Meta::CPAN
diag sprintf " Class: %.4f seconds", $timing_results{class_access};
diag sprintf " Class::More: %.4f seconds", $timing_results{class_more_access};
# Role Composition Performance - Same Role with different classes
diag "\n=== Benchmarking Role Composition ($ROLE_ITERATIONS iterations) ===";
$timing_results{class_with_role} = run_highres_benchmark(sub {
Test::Performance::ClassWithRole->new(name => 'test');
}, $ROLE_ITERATIONS);
t/99-performance-regression.t view on Meta::CPAN
diag sprintf " Class + Role: %.4f seconds", $timing_results{class_with_role};
diag sprintf " Class::More + Role: %.4f seconds", $timing_results{class_more_with_role};
# Role Method Access
diag "\n=== Benchmarking Role Method Access ($ITERATIONS iterations) ===";
my $class_role_obj = Test::Performance::ClassWithRole->new(name => 'test');
my $class_more_role_obj = Test::Performance::ClassMoreWithRole->new(name => 'test');
$timing_results{class_role_method} = run_highres_benchmark(sub {
$class_role_obj->role_method;
t/99-performance-regression.t view on Meta::CPAN
diag sprintf " Class + Role method: %.4f seconds", $timing_results{class_role_method};
diag sprintf " Class::More + Role method: %.4f seconds", $timing_results{class_more_role_method};
# Multiple Role Composition
diag "\n=== Benchmarking Multiple Role Composition (".($ROLE_ITERATIONS/2)." iterations) ===";
$timing_results{class_multi_role} = run_highres_benchmark(sub {
Test::Performance::ClassWithMultipleRoles->new;
}, $ROLE_ITERATIONS/2);
t/99-performance-regression.t view on Meta::CPAN
diag sprintf " Class + 3 Roles: %.4f seconds", $timing_results{class_multi_role};
diag sprintf " Class::More + 3 Roles: %.4f seconds", $timing_results{class_more_multi_role};
# Inheritance Performance
diag "\n=== Benchmarking Inheritance ($ITERATIONS iterations) ===";
$timing_results{class_inherit} = run_highres_benchmark(sub {
Test::Performance::ClassChild->new(name => 'test');
});
view all matches for this distribution
view release on metacpan or search on metacpan
benchmark/class-std.pl view on Meta::CPAN
Each test creates an object an stacks two objects into it (two levels)\n";
for my $class ('MyBenchTestFastCache', 'MyBenchTestFastBasic') {
#, 'MyBenchTestFast', 'MyBenchTest') {
my $n = 100000;
print "\n$class ($n iterations - first run)\n";
timethis $n, sub {
push @list, $class->new();
$list[-1]->set_one($class->new());
$list[-1]->get_one()->set_two($class->new());
$list[-1]->get_one();
};
print "Cleanup: Destroying ${ \($n *3) } objects\n";
timethis 1, sub { undef @list };
print "\n$class ($n iterations - second run)\n";
timethis $n , sub {
push @list, $class->new();
$list[-1]->set_one($class->new());
$list[-1]->get_one()->set_two($class->new());
$list[-1]->get_one();
view all matches for this distribution