Skip to content

Commit

Permalink
Fix wrong unit in Flask new semconv test (#2645)
Browse files Browse the repository at this point in the history
  • Loading branch information
emdneto authored Jul 1, 2024
1 parent 58a6d3a commit 529178d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def test_flask_metrics_new_semconv(self):
self.client.get("/hello/123")
self.client.get("/hello/321")
self.client.get("/hello/756")
duration = max(round((default_timer() - start) * 1000), 0)
duration_s = max(default_timer() - start, 0)
metrics_list = self.memory_metrics_reader.get_metrics_data()
number_data_point_seen = False
histogram_data_point_seen = False
Expand All @@ -514,7 +514,7 @@ def test_flask_metrics_new_semconv(self):
if isinstance(point, HistogramDataPoint):
self.assertEqual(point.count, 3)
self.assertAlmostEqual(
duration, point.sum, delta=10
duration_s, point.sum, places=2
)
histogram_data_point_seen = True
if isinstance(point, NumberDataPoint):
Expand Down

0 comments on commit 529178d

Please sign in to comment.