Skip to content
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

chore(system-test): add tick log every second #2129

Conversation

NathanFlurry
Copy link
Member

Changes

Copy link

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 32d1094
Status:🚫  Build failed.

View logs

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added a tick counter that logs every second in the system test server for monitoring and debugging purposes.

  • Added setInterval in /examples/misc/system-test/src/shared/server.ts to log tick count every second
  • Potential memory leak risk as interval timer is not cleared on server exit
  • Consider adding interval cleanup in server shutdown logic
  • High frequency logging (1/sec) may impact performance in production environments

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +17 to +21
let tickIndex = 0;
setInterval(() => {
tickIndex++;
console.log("Tick", tickIndex);
}, 1000);
Copy link

Choose a reason for hiding this comment

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

logic: No cleanup for setInterval. Store the interval ID and clear it when the server exits to prevent memory leaks.

Suggested change
let tickIndex = 0;
setInterval(() => {
tickIndex++;
console.log("Tick", tickIndex);
}, 1000);
let tickIndex = 0;
const intervalId = setInterval(() => {
tickIndex++;
console.log("Tick", tickIndex);
}, 1000);
// Clear interval when process exits
process.on('exit', () => clearInterval(intervalId));

Copy link
Member Author

NathanFlurry commented Mar 6, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

graphite-app bot commented Mar 6, 2025

Merge activity

  • Mar 6, 4:30 AM EST: A user added this pull request to the Graphite merge queue.
  • Mar 6, 4:31 AM EST: CI is running for this PR on a draft PR: #2130
  • Mar 6, 4:32 AM EST: A user merged this pull request with the Graphite merge queue via draft PR: #2130.

graphite-app bot pushed a commit that referenced this pull request Mar 6, 2025
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
@graphite-app graphite-app bot deleted the branch 03-06-fix_fix_connecting_to_clickhouse_from_edge_servers March 6, 2025 09:32
@graphite-app graphite-app bot closed this Mar 6, 2025
@graphite-app graphite-app bot closed this Mar 6, 2025
@graphite-app graphite-app bot deleted the 03-06-chore_system-test_add_tick_log_every_second branch March 6, 2025 09:32
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.

1 participant