Skip to content

Conversation

@JacksonWeber
Copy link
Contributor

@JacksonWeber JacksonWeber commented Jun 27, 2025

Adds 15 Second Delay Timer to Exporting Long Interval Statsbeat

@JacksonWeber JacksonWeber requested a review from Copilot June 27, 2025 23:22

This comment was marked as outdated.

@JacksonWeber JacksonWeber requested a review from Copilot June 30, 2025 21:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a 15-second delay before the first long-interval Statsbeat export and updates tests to verify initial delay, regular scheduling, and re-enable/disable behavior.

  • Introduces _longHandleTimeout and schedules the first trackLongIntervalStatsbeats after 15 seconds.
  • Updates enable()/disable() logic to manage both timeout and interval handles.
  • Adds unit tests covering initial delay, regular intervals, multiple enable calls, and disable-before-delay.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
Tests/AutoCollection/Statsbeat.tests.ts New tests for initial delay, repeated enables, and disable behavior for long-interval Statsbeat
AutoCollection/Statsbeat.ts Added _longHandleTimeout, initialized it, and updated enable()/disable() logic

@JacksonWeber JacksonWeber requested a review from hectorhdzg July 1, 2025 20:18
@JacksonWeber JacksonWeber changed the title Add 15 Second Delay to Long Interval Statsbeat Add 15 Second Delay to Long Interval Statsbeat & Fix Tests Jul 1, 2025
@JacksonWeber JacksonWeber merged commit e874950 into microsoft:2.x Jul 2, 2025
8 checks passed
@JacksonWeber JacksonWeber mentioned this pull request Jul 25, 2025
@JacksonWeber JacksonWeber mentioned this pull request Aug 11, 2025
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.

2 participants