summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping/probes/base.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Smokeping/probes/base.pm')
-rw-r--r--lib/Smokeping/probes/base.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Smokeping/probes/base.pm b/lib/Smokeping/probes/base.pm
index 7747b77..15cd03e 100644
--- a/lib/Smokeping/probes/base.pm
+++ b/lib/Smokeping/probes/base.pm
@@ -64,7 +64,7 @@ sub new($$)
my $class = ref($this) || $this;
my $self = { properties => shift, cfg => shift,
name => shift,
- targets => {}, rtts => {}, addrlookup => {}};
+ targets => {}, rtts => {}, addrlookup => {}, rounds_count => 0};
bless $self, $class;
return $self;
}
@@ -94,6 +94,18 @@ sub ProbeUnit ($) {
return "Seconds";
}
+# this is a read-only variable that should get incremented by
+# the ping() method
+sub rounds_count ($) {
+ my $self = shift;
+ return $self->{rounds_count};
+}
+
+sub increment_rounds_count ($) {
+ my $self = shift;
+ $self->{rounds_count}++;
+}
+
sub target2dynfile ($$) {
# the targets are stored in the $self->{targets}
# hash as filenames pointing to the RRD files