summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2fa2ace)
raw | patch | inline | side by side (parent: 2fa2ace)
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 |
index 381b2d17ce941432cb49b6c5519dd5fe0da39750..abf058f6d7e116779bd0a8d37edbefd1ab6e1802 100644 (file)
}
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 {