main commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-16 16:30:25 +09:00
parent 91c7e04474
commit 537e7b363f
1146 changed files with 45926 additions and 77196 deletions

View File

@@ -1,4 +1,4 @@
from typing import Dict, NamedTuple, Optional, Sequence, Union
from typing import Dict, NamedTuple, Optional, Union
class Timestamp:
@@ -28,16 +28,7 @@ class Timestamp:
return not self == other
def __gt__(self, other: "Timestamp") -> bool:
return self.nsec > other.nsec if self.sec == other.sec else self.sec > other.sec
def __lt__(self, other: "Timestamp") -> bool:
return self.nsec < other.nsec if self.sec == other.sec else self.sec < other.sec
# BucketSpan is experimental and subject to change at any time.
class BucketSpan(NamedTuple):
offset: int
length: int
return self.sec > other.sec or self.nsec > other.nsec
# Timestamp and exemplar are optional.
@@ -51,24 +42,9 @@ class Exemplar(NamedTuple):
timestamp: Optional[Union[float, Timestamp]] = None
# NativeHistogram is experimental and subject to change at any time.
class NativeHistogram(NamedTuple):
count_value: float
sum_value: float
schema: int
zero_threshold: float
zero_count: float
pos_spans: Optional[Sequence[BucketSpan]] = None
neg_spans: Optional[Sequence[BucketSpan]] = None
pos_deltas: Optional[Sequence[int]] = None
neg_deltas: Optional[Sequence[int]] = None
nh_exemplars: Optional[Sequence[Exemplar]] = None
class Sample(NamedTuple):
name: str
labels: Dict[str, str]
value: float
timestamp: Optional[Union[float, Timestamp]] = None
exemplar: Optional[Exemplar] = None
native_histogram: Optional[NativeHistogram] = None