projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fa2ace
)
update MockDaemon to report fractional seconds
author
Matthias Bethke
<mbe@financial.com>
Tue, 22 Nov 2016 16:30:37 +0000
(23:30 +0700)
committer
Matthias Bethke
<mbe@financial.com>
Tue, 22 Nov 2016 16:30:37 +0000
(23:30 +0700)
bindings/perl/lib/Collectd/MockDaemon.pm
patch
|
blob
|
history
diff --git
a/bindings/perl/lib/Collectd/MockDaemon.pm
b/bindings/perl/lib/Collectd/MockDaemon.pm
index
381b2d1
..
abf058f
100644
(file)
--- a/
bindings/perl/lib/Collectd/MockDaemon.pm
+++ b/
bindings/perl/lib/Collectd/MockDaemon.pm
@@
-55,9
+55,9
@@
sub daemon {
}
sub listval {
- my $
now = time
;
+ my $
trunc_now = substr(time, 0, -1)
;
return print_nvalues(scalar @metrics) .
- join('', map {
"$now $_\n"
} @metrics);
+ join('', map {
sprintf("%s%d.%d %s\n", $trunc_now, rand(10), rand(1000), $_)
} @metrics);
}
sub getval {