[ML] Fix issues with end time of explorer swimlane selection #18995
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.
Fixes a couple of issues around selection in the Anomaly Explorer swimlane caused by incorrect setting of the end time used in the drilldown queries:
The selection end time included the start of the next bucket e.g. for a swimlane cell with a 4 hour interval, a cell representing a time range from 04:00 to 07:59:59.999, the end time was being set to 08:00:00.000. This caused anomalies in the next bucket to be incorrectly shown in drilldowns and affected swimlane lane order. The end time is now being correctly set to e.g 07:59:59.999.
With swimlane multi-selection enabled (see [ML] Enable cell range selection. #18920), the end time of the selection was being set to the START time of the last cell in the selection, rather than the END time of the selection.
Also fixes an inconsistency between the
influencer_score
criteria between the Top Influencers List and the swimlanes. The swimlane has been using a filter ofinfluencer_score > 0
whereas the Top Influencers List has been showinginfluencer_score >= 0
, which can often result in a difference between the number of influencers shown in the Top Influencers List (which was including influencers with a score of 0) and the number of lanes in the swimlane. The query for the Top Influencers List has been edited to make it consistent with the swimlane query i.e. only show influencers with a score greater than zero.Example screenshot before fix (view by swimlane has 8 eight lanes, two of which have a score of zero as they include the start of the next bucket):
Example screenshot after fix (view by swimlane and Top Influencers both now show 6 lanes)
Note the swimlane selection mask was temporarily removed for the screenshots above to emphasize the swimlane cell severities around the time of the selection.
Fixes #18575