Skip to content

Commit

Permalink
Rename variables and add explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Oct 5, 2023
1 parent c5fc8d8 commit 3fae820
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def conflicts(self, other: "_ViewInstrumentMatch") -> bool:
result
and self._aggregation._instrument_is_monotonic
== other._aggregation._instrument_is_monotonic
and self._aggregation._instrument_temporality
== other._aggregation._instrument_temporality
and self._aggregation._instrument_aggregation_temporality
== other._aggregation._instrument_aggregation_temporality
)

return result
Expand Down Expand Up @@ -124,15 +124,15 @@ def consume_measurement(self, measurement: Measurement) -> None:

def collect(
self,
aggregation_temporality: AggregationTemporality,
collection_aggregation_temporality: AggregationTemporality,
collection_start_nanos: int,
) -> Optional[Sequence[DataPointT]]:

data_points: List[DataPointT] = []
with self._lock:
for aggregation in self._attributes_aggregation.values():
data_point = aggregation.collect(
aggregation_temporality, collection_start_nanos
collection_aggregation_temporality, collection_start_nanos
)
if data_point is not None:
data_points.append(data_point)
Expand Down
Loading

0 comments on commit 3fae820

Please sign in to comment.