r58502 - in /branches/upstream/librrdtool-oo-perl/current: Changes MANIFEST META.yml README lib/RRDTool/OO.pm t/011Bugs.t

carnil-guest at users.alioth.debian.org carnil-guest at users.alioth.debian.org
Thu May 27 09:40:55 UTC 2010


Author: carnil-guest
Date: Thu May 27 09:40:43 2010
New Revision: 58502

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58502
Log:
[svn-upgrade] Integrating new upstream version, librrdtool-oo-perl (0.31)

Added:
    branches/upstream/librrdtool-oo-perl/current/t/011Bugs.t
Modified:
    branches/upstream/librrdtool-oo-perl/current/Changes
    branches/upstream/librrdtool-oo-perl/current/MANIFEST
    branches/upstream/librrdtool-oo-perl/current/META.yml
    branches/upstream/librrdtool-oo-perl/current/README
    branches/upstream/librrdtool-oo-perl/current/lib/RRDTool/OO.pm

Modified: branches/upstream/librrdtool-oo-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/Changes?rev=58502&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/Changes (original)
+++ branches/upstream/librrdtool-oo-perl/current/Changes Thu May 27 09:40:43 2010
@@ -1,3 +1,9 @@
+0.31  (05/26/2010)
+    (ms) [rt.cpan.org #54870] Fixed typos/pod errors reported by
+         Salvatore Bonaccorso.
+    (ms) Fixed overwriting input parameters in create(), bug reported
+         by Erik Wasser.
+
 0.30  (02/21/2010)
     (ms) [RT 53961] Worked around rrdtool-1.3.5 inaccuracy problem by
          skipping certain tests for rrdtool <= 1.4.

Modified: branches/upstream/librrdtool-oo-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/MANIFEST?rev=58502&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/MANIFEST (original)
+++ branches/upstream/librrdtool-oo-perl/current/MANIFEST Thu May 27 09:40:43 2010
@@ -4,9 +4,9 @@
 eg/graph.pl
 lib/RRDTool/OO.pm
 Makefile.PL
-MANIFEST
+MANIFEST			This list of files
 MANIFEST.SKIP
-META.yml			Module meta-data (added by MakeMaker)
+META.yml
 README
 t/001Basic.t
 t/002Pod.t
@@ -18,3 +18,4 @@
 t/008Mult.t
 t/009Dry.t
 t/010ABD.t
+t/011Bugs.t

Modified: branches/upstream/librrdtool-oo-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/META.yml?rev=58502&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/META.yml (original)
+++ branches/upstream/librrdtool-oo-perl/current/META.yml Thu May 27 09:40:43 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               RRDTool-OO
-version:            0.30
+version:            0.31
 abstract:           Object-oriented interface to RRDTool
 author:
     - Mike Schilli <m at perlmeister.com>

Modified: branches/upstream/librrdtool-oo-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/README?rev=58502&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/README (original)
+++ branches/upstream/librrdtool-oo-perl/current/README Thu May 27 09:40:43 2010
@@ -1,5 +1,5 @@
 ######################################################################
-    RRDTool::OO 0.30
+    RRDTool::OO 0.31
 ######################################################################
 
 NAME
@@ -111,7 +111,7 @@
 
         If you want to combine several primary data points into one archive
         point, specify values for "cpoints" (the number of points to
-        combine) and "cfunc" (the consolidation function) explicitely:
+        combine) and "cfunc" (the consolidation function) explicitly:
 
             $rrd->create(
                  step        => 60,
@@ -257,7 +257,7 @@
             );
 
         This will assume a start time of 24 hours before now and an end time
-        of now. Specify "start" and "end" explicitely to be clear:
+        of now. Specify "start" and "end" explicitly to be clear:
 
             $rrd->graph(
               image          => $image_file_name,
@@ -274,7 +274,7 @@
         parameters not specified. The values for data source and
         consolidation function default to the first values it finds in the
         RRD. If there are multiple datasources in the RRD or multiple
-        archives with different values for "cfunc", just specify explicitely
+        archives with different values for "cfunc", just specify explicitly
         which one to draw:
 
             $rrd->graph(
@@ -599,87 +599,87 @@
         with "RRDTool::OO".
 
   Aberrant behavior detection
-        RRDTool supports aberrant behavior detection (ABD), which takes a
-        data source, stuffs its values into a special RRA, smoothes the data
-        stream, tries to predict future values and triggers an alert if
-        actual values are way off the predicted values.
-
-        Using a fairly elaborate algorithm not only allows it to find out if
-        a data source produces a value that exceeds a certain fixed
-        threshold. The algorithm constantly adapts its parameters to the
-        input data and acts dynamically on slowly changing values.
-
-        The "alpha" parameter specifies the baseline and lies between 0 and
-        1. Values close to 1 specify that most recent values have the most
-        weight on the prediction, whereas values close to 0 indicate that
-        past values carry higher weight.
-
-        On top of that, ABD can deal with data input that displays
-        continuously rising values (slope). The "beta" parameters, again
-        between 0 and 1, specifies whether past values or more recent values
-        carry the most weight.
-
-        And, furthermore, it deals with seasonal cycles, so it won't freak
-        out if there's a daily peak at noon. The "gamma" parameter indicates
-        this, if you don't specify it, it defaults to the value of "alpha".
-
-        In the easiest case, an RRA with aberrant behavior detection can be
-        created like
-
-                # Create a round-robin database
-            $rrd->create(
-                 step        => 1,  # one-second intervals
-                 data_source => { name      => "mydatasource",
-                                  type      => "GAUGE" },
-                 hwpredict   => { rows => 3600,
-                                },
-            );
-
-        where "alpha" and "beta" default to 0.5, and the "seasonal_period"
-        defaults to 1/5 of the rows number.
-
-        "rows" is the number of primary data points that are stored in the
-        RRA before a wrap-around happens. Note that with ABD enabled,
-        RRDTool won't consolidate the data from a data source before
-        stuffing it into the HWPREDICT RRAs, as the whole point of ABD is to
-        smooth unfiltered data and predict future values.
-
-        A violation happen if a new measured value falls outside of the
-        prediction. If "threshold" or more violations happen within
-        "window_length", an error is reported to the FAILURES RRA.
-        "threshold" defaults to 7, "window_length" to 9.
-
-        A more elaborate RRD could be defined as
-
-                # Create a round-robin database
-            $rrd->create(
-                 step        => 1,  # one-second intervals
-                 data_source => { name      => "mydatasource",
-                                  type      => "GAUGE" },
-                 hwpredict   => { rows          => 3600,
-                                  alpha         => 0.1,
-                                  beta          => 0.1,
-                                  gamma         => 0.1,
-                                  threshold     => 7,
-                                  window_length => 9,
-                                },
-            );
-
-        If you want to peek under the hood (not that you need to, just for
-        your entertainment), with the specification above, RRDTool::OO will
-        create the following five RRAs according to the RRDtool
-        specification and fill in these values:
-
-            * RRA:HWPREDICT:rows:alpha:beta:seasonal_period:rra-num
-            * RRA:SEASONAL:seasonal period:gamma:rra-num
-            * RRA:DEVSEASONAL:seasonal period:gamma:rra-num
-            * RRA:DEVPREDICT:rows:rra-num
-            * RRA:FAILURES:rows:threshold:window_length:rra-num
-
-        The "rra-num" argument is an internal index referencing other RRAs
-        (for example, HWPREDICT references SEASONAL), but this will be taken
-        care of automatically by RRDTool::OO with no user interaction
-        required whatsoever.
+    RRDTool supports aberrant behavior detection (ABD), which takes a data
+    source, stuffs its values into a special RRA, smoothes the data stream,
+    tries to predict future values and triggers an alert if actual values
+    are way off the predicted values.
+
+    Using a fairly elaborate algorithm not only allows it to find out if a
+    data source produces a value that exceeds a certain fixed threshold. The
+    algorithm constantly adapts its parameters to the input data and acts
+    dynamically on slowly changing values.
+
+    The "alpha" parameter specifies the baseline and lies between 0 and 1.
+    Values close to 1 specify that most recent values have the most weight
+    on the prediction, whereas values close to 0 indicate that past values
+    carry higher weight.
+
+    On top of that, ABD can deal with data input that displays continuously
+    rising values (slope). The "beta" parameters, again between 0 and 1,
+    specifies whether past values or more recent values carry the most
+    weight.
+
+    And, furthermore, it deals with seasonal cycles, so it won't freak out
+    if there's a daily peak at noon. The "gamma" parameter indicates this,
+    if you don't specify it, it defaults to the value of "alpha".
+
+    In the easiest case, an RRA with aberrant behavior detection can be
+    created like
+
+            # Create a round-robin database
+        $rrd->create(
+             step        => 1,  # one-second intervals
+             data_source => { name      => "mydatasource",
+                              type      => "GAUGE" },
+             hwpredict   => { rows => 3600,
+                            },
+        );
+
+    where "alpha" and "beta" default to 0.5, and the "seasonal_period"
+    defaults to 1/5 of the rows number.
+
+    "rows" is the number of primary data points that are stored in the RRA
+    before a wrap-around happens. Note that with ABD enabled, RRDTool won't
+    consolidate the data from a data source before stuffing it into the
+    HWPREDICT RRAs, as the whole point of ABD is to smooth unfiltered data
+    and predict future values.
+
+    A violation happen if a new measured value falls outside of the
+    prediction. If "threshold" or more violations happen within
+    "window_length", an error is reported to the FAILURES RRA. "threshold"
+    defaults to 7, "window_length" to 9.
+
+    A more elaborate RRD could be defined as
+
+            # Create a round-robin database
+        $rrd->create(
+             step        => 1,  # one-second intervals
+             data_source => { name      => "mydatasource",
+                              type      => "GAUGE" },
+             hwpredict   => { rows          => 3600,
+                              alpha         => 0.1,
+                              beta          => 0.1,
+                              gamma         => 0.1,
+                              threshold     => 7,
+                              window_length => 9,
+                            },
+        );
+
+    If you want to peek under the hood (not that you need to, just for your
+    entertainment), with the specification above, RRDTool::OO will create
+    the following five RRAs according to the RRDtool specification and fill
+    in these values:
+
+        * RRA:HWPREDICT:rows:alpha:beta:seasonal_period:rra-num
+        * RRA:SEASONAL:seasonal period:gamma:rra-num
+        * RRA:DEVSEASONAL:seasonal period:gamma:rra-num
+        * RRA:DEVPREDICT:rows:rra-num
+        * RRA:FAILURES:rows:threshold:window_length:rra-num
+
+    The "rra-num" argument is an internal index referencing other RRAs (for
+    example, HWPREDICT references SEASONAL), but this will be taken care of
+    automatically by RRDTool::OO with no user interaction required
+    whatsoever.
 
   Development Status
     The following methods are not yet implemented:
@@ -789,7 +789,7 @@
             level    => $DEBUG
         }); 
 
-    If you're interested particularily in *rrdtool* commands issued by
+    If you're interested particularly in *rrdtool* commands issued by
     "RRDTool::OO" while you're operating it, just enable the category
     "rrdtool":
 

Modified: branches/upstream/librrdtool-oo-perl/current/lib/RRDTool/OO.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/lib/RRDTool/OO.pm?rev=58502&op=diff
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/lib/RRDTool/OO.pm (original)
+++ branches/upstream/librrdtool-oo-perl/current/lib/RRDTool/OO.pm Thu May 27 09:40:43 2010
@@ -7,7 +7,7 @@
 use RRDs;
 use Log::Log4perl qw(:easy);
 
-our $VERSION = '0.30';
+our $VERSION = '0.31';
 
    # Define the mandatory and optional parameters for every method.
 our $OPTIONS = {
@@ -269,9 +269,11 @@
     my @hwpredict;
 
     for(my $i=0; $i < @options; $i += 2) {
-        push @archives, $options[$i+1] if $options[$i] eq "archive";
-        push @hwpredict, $options[$i+1] if $options[$i] eq "hwpredict";
-        push @data_sources, $options[$i+1] if $options[$i] eq "data_source";
+          # Push copies (!) of original hashes onto internal data structures
+        push @archives, { %{$options[$i+1]} } if $options[$i] eq "archive";
+        push @hwpredict, { %{$options[$i+1]} } if $options[$i] eq "hwpredict";
+        push @data_sources, 
+            { %{$options[$i+1]} } if $options[$i] eq "data_source";
     }
 
     if(!@archives and !@hwpredict) {
@@ -1287,7 +1289,7 @@
 to combine several primary data points into one archive point, specify
 values for 
 C<cpoints> (the number of points to combine) and C<cfunc> 
-(the consolidation function) explicitely:
+(the consolidation function) explicitly:
 
     $rrd->create(
          step        => 60,
@@ -1444,7 +1446,7 @@
     );
 
 This will assume a start time of 24 hours before now and an
-end time of now. Specify C<start> and C<end> explicitely to
+end time of now. Specify C<start> and C<end> explicitly to
 be clear:
 
     $rrd->graph(
@@ -1462,7 +1464,7 @@
 not specified. The values for data source and consolidation function
 default to the first values it finds in the RRD.
 If there are multiple datasources in the RRD or multiple archives
-with different values for C<cfunc>, just specify explicitely which
+with different values for C<cfunc>, just specify explicitly which
 one to draw:
 
     $rrd->graph(
@@ -1820,6 +1822,8 @@
 Return the message of the last error that occurred while interacting
 with C<RRDTool::OO>.
 
+=back
+
 =head2 Aberrant behavior detection
 
 RRDTool supports aberrant behavior detection (ABD), which takes a data
@@ -1903,8 +1907,6 @@
 RRAs (for example, HWPREDICT references SEASONAL), but this will 
 be taken care of automatically by RRDTool::OO with no user
 interaction required whatsoever.
-
-=back
 
 =head2 Development Status
 
@@ -2017,7 +2019,7 @@
         level    => $DEBUG
     }); 
 
-If you're interested particularily in I<rrdtool> commands issued
+If you're interested particularly in I<rrdtool> commands issued
 by C<RRDTool::OO> while you're operating it, just enable the
 category C<"rrdtool">:
 

Added: branches/upstream/librrdtool-oo-perl/current/t/011Bugs.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/librrdtool-oo-perl/current/t/011Bugs.t?rev=58502&op=file
==============================================================================
--- branches/upstream/librrdtool-oo-perl/current/t/011Bugs.t (added)
+++ branches/upstream/librrdtool-oo-perl/current/t/011Bugs.t Thu May 27 09:40:43 2010
@@ -1,0 +1,17 @@
+
+use Test::More qw(no_plan);
+use RRDTool::OO;
+
+my $aref = [
+    step        => 1,
+    data_source => { name      => "mydatasource",
+                     type      => "GAUGE" },
+    archive => { rows => 30 }
+];
+
+my $rrd = RRDTool::OO->new( file => "foo" );
+$rrd->create( @{ $aref } );
+
+ok !exists $aref->[5]->{ cfunc }, "input parameter not overwritten";
+
+unlink "foo";




More information about the Pkg-perl-cvs-commits mailing list