-
Notifications
You must be signed in to change notification settings - Fork 67
Add per-minute hero damage, healing and camp stack series #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
geracosta
wants to merge
2
commits into
odota:master
Choose a base branch
from
geracosta:minute-series
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to bucket into minutes here? Isn't hero damage/healing additive, so we can just add to it whenever we encounter a combat log event and then add on minute boundaries?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damage is additive — the bucketing isn't about that, it's about stream order. The combat log entries aren't strictly ordered against the interval entries: events for game time T can show up in the stream after the interval entry for T. With a running total snapshotted at each interval, every sample misses the tail of its own minute (it lands one sample late), and anything after the last interval entry is lost for good — that's how I first ran into it, the accumulator version was dropping the final teamfight from the last sample on the match I verified against the scoreboard. Bucketing by event time makes each sample include exactly what happened up to its boundary, regardless of arrival order. Memory-wise it's one int per slot per minute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm if this is true I feel like it's a problem with how we emit the interval events--I think they are supposed to be aligned wiith the game time minutes? And if that's true I think the combat log events should be in the correct buckets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interval entries are aligned to game time — that part works like you'd expect (
onTickStartemits the interval for second T on the first tick where game time reaches T). What's not aligned is where the combat log lands in the stream: intervals are written at tick start, while combat log entries come from the packet messages processed after it, and the message carrying an event can arrive a tick or two after the event's timestamp. So the output stream interleaves records whosetimefields aren't globally sorted — a damage record stamped T can sit after the interval record for T. The timestamps are correct; it's the stream position that lags.Fixing that on the emission side would mean buffering and re-sorting the output by time before writing, with no clean point where it's safe to flush — and it would change stream order for every existing consumer. Even with a perfectly sorted stream, the tail is still lost: intervals stop at postGame, but the fight that ends the game doesn't, so everything stamped after the last interval has nothing later to land in. That's how I ran into this — the accumulator version dropped the entire last teamfight of the match I was checking against the scoreboard.
The existing series don't hit any of this because they sample entity counters (gold/lh/xp are read from PlayerResource state at the tick, so they're consistent at the moment they're read). There's no per-hero damage or healing counter on those entities, so these series have to be summed from combat log events — and once you're summing events, bucketing them by their own timestamp is just using the ground truth they already carry.