Skip to content

Conversation

martinthomson
Copy link
Member

@martinthomson martinthomson commented Jun 20, 2025

I considered doing this in the way that the issue suggested, but when I got down to it, that would require the definition of a new method to get epoch start and end times. This does it based on epoch indices.

In short, this iterates all impressions in the store, gets the epoch index that corresponds to the timestamp, and skips any that are not equal to the epoch we're looking at.

I've tweaked the short circuit on lookback to also use epoch index. It checks whether the epoch index for now - lookback is less than the current epoch.

In practice, this would be horribly inefficient. You would definitely not want to implement things this way. The upside is that this is fairly straightforward to specify and understand.

Closes #207.


Preview | Diff

I considered doing this in the way that the issue suggested, but when I
got down to it, that would require the definition of a new method to get
epoch start and end times.  This does it based on epoch indices.

In short, this iterates all impressions in the store, gets the epoch
index that corresponds to the timestamp, and skips any that are not
equal to the epoch we're looking at.

I've tweaked the short circuit on lookback to also use epoch index.  It
checks whether the epoch index for now - lookback is less than the
current epoch.

In practice, this would be horribly inefficient. You would definitely
not want to implement things this way.  The upside is that this is
fairly straightforward to specify and understand.

Closes #207.
@apasel422 apasel422 merged commit 44864d3 into main Jun 24, 2025
2 checks passed
@apasel422 apasel422 deleted the epoch-filter branch June 24, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define epoch usage in common matching logic Common matching logic should define "for the epoch"
3 participants