We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c0e72e + c4f9c0f commit 86d6438Copy full SHA for 86d6438
lib/fluent/plugin/node_exporter/time_collector.rb
@@ -35,7 +35,7 @@ def run
35
36
def time_update
37
current_time = Fluent::EventTime.now
38
- value = current_time.to_i / 1e9
+ value = current_time.to_i
39
@gauge.set(value)
40
end
41
test/plugin/test_time_collector.rb
@@ -9,7 +9,7 @@ def test_time_now
9
stub(Fluent::EventTime).now { Fluent::EventTime.new(1e9) }
10
collector.run
11
time_seconds = collector.cmetrics[:time_seconds]
12
- assert_equal(1.0, time_seconds.val)
+ assert_equal(1_000_000_000, time_seconds.val)
13
14
15
0 commit comments