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

Suppress extremely chatty TimerScheduler debug messages #7102

Merged

Conversation

Arkatufus
Copy link
Contributor

Changes

  • Add new setting "akka.actor.debug.log-timers", when set to true, TimerScheduler will emit debug messages.
  • Set "akka.actor.debug.log-timers" default to false'
  • Suppress TimerScheduler debug messages
  • Add unit tests

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

Choose a reason for hiding this comment

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

LGTM

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) February 26, 2024 14:56
Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Need to make some optimizations around config loading


public TimerScheduler(IActorContext ctx)
{
_ctx = ctx;
_log = _ctx.System.Log;
_logDebug = ctx.System.Settings.Config.GetBoolean("akka.actor.debug.log-timers");
Copy link
Member

Choose a reason for hiding this comment

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

Eh, one wrinkle here - it's better to have this setting get pulled into the Settings class once rather than parsed by each and every actor that uses the scheduler. For processes with a large number of actors that overhead + allocations from the parser can become significant. It's not a big deal when running a small number of actors that use IWithTimers, but if you're running hundreds of thousands that can add up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

LGTM

@Aaronontheweb Aaronontheweb merged commit 87bd24a into akkadotnet:dev Feb 29, 2024
3 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants