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

metrics: add IOMetrics #2

Merged
merged 1 commit into from
Jul 8, 2024
Merged

metrics: add IOMetrics #2

merged 1 commit into from
Jul 8, 2024

Conversation

iRevive
Copy link
Contributor

@iRevive iRevive commented Jul 6, 2024

The functionality relies on the cats-effect MBeans to collect metrics. There are three different metrics:

1) Compute

Available via IOMetrics.registerComputeMetrics:

  • cats.effect.runtime.compute.thread.count
  • cats.effect.runtime.compute.thread.active.count
  • cats.effect.runtime.compute.thread.blocked.count
  • cats.effect.runtime.compute.thread.searching.count
  • cats.effect.runtime.compute.fiber.enqueued.count

2) CPU starvation

Available via IOMetrics.registerCpuStarvationMetrics:

  • cats.effect.runtime.cpu.starvation.count
  • cats.effect.runtime.cpu.starvation.clock.drift.current
  • cats.effect.runtime.cpu.starvation.clock.drift.max

3) Local queue

Available via IOMetrics.registerLocalQueueMetrics:

  • cats.effect.runtime.local.queue.fiber.enqueued.count
  • cats.effect.runtime.local.queue.fiber.spillover.count
  • cats.effect.runtime.local.queue.fiber.steal.attempt.count
  • cats.effect.runtime.local.queue.fiber.stolen.count
  • cats.effect.runtime.local.queue.fiber.total.count
  • cats.effect.runtime.local.queue.head.index
  • cats.effect.runtime.local.queue.tag.head.real
  • cats.effect.runtime.local.queue.tag.head.steal
  • cats.effect.runtime.local.queue.tag.tail
  • cats.effect.runtime.local.queue.tail.index

Here, I'm a bit skeptical about whether the following metrics are relevant at all:

  • cats.effect.runtime.local.queue.head.index
  • cats.effect.runtime.local.queue.tag.head.real
  • cats.effect.runtime.local.queue.tag.head.steal
  • cats.effect.runtime.local.queue.tag.tail
  • cats.effect.runtime.local.queue.tail.index

@iRevive iRevive merged commit 0f8024e into main Jul 8, 2024
9 checks passed
@iRevive iRevive deleted the ce-mbean-metrics branch July 8, 2024 14:22
@swapdonkey
Copy link

Looks good.
I think your right to skip:
cats.effect.runtime.local.queue.head.index
cats.effect.runtime.local.queue.tag.head.real
cats.effect.runtime.local.queue.tag.head.steal
cats.effect.runtime.local.queue.tag.tail
cats.effect.runtime.local.queue.tail.index

I think they'll just be noise

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