Skip to content

Commit

Permalink
Merge branch 'master' into pierre/continuous-profiling-dataset-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
phacops committed May 14, 2024
2 parents 5ad30f7 + 02c225b commit 5f3f490
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/datasets/processors/test_metrics_summaries_processor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from datetime import datetime
from datetime import datetime, timedelta
from typing import Any, Mapping, Sequence

import pytest
Expand All @@ -17,18 +17,24 @@


def build_metrics_summary_payload() -> MetricsSummary:

received_timestamp = datetime.timestamp(
datetime.now() - timedelta(days=1) - timedelta(seconds=5)
)
end_timestamp = datetime.timestamp(datetime.now() - timedelta(days=1))

return MetricsSummary(
{
"count": 1,
"duration_ms": 1000,
"end_timestamp": 1707862430.123,
"end_timestamp": end_timestamp,
"group": "deadbeefdeadbeef",
"is_segment": False,
"max": 1.0,
"min": 1.0,
"mri": "t:namespace/name@unit",
"project_id": 42,
"received": 1707862428.123,
"received": received_timestamp,
"retention_days": 90,
"segment_id": "deadbeefdeadbeef",
"span_id": "deadbeefdeadbeef",
Expand Down

0 comments on commit 5f3f490

Please sign in to comment.