Skip to content

Conversation

@timmartin-stripe
Copy link
Contributor

Context

Using a similar set of metrics to what the TimedChunker uses. It's helpful for diagnosing queue depth issues. When we switched to the SPSC queue, we were surprised the metrics were missing so I figured we could add them in.

Checklist

  • ./gradlew build compiles code correctly
  • Added new tests where applicable
  • ./gradlew test passes all tests
  • Extended README or added javadocs where applicable

Using a similar set of metrics to what the `TimedChunker` uses.  It's
helpful for diagnosing queue depth issues.  When we switched to the SPSC
queue, we were surprised the metrics were missing so I figured we could
add them in.
this.connectionManager = connMgr;
chunk = new Object[this.chunkSize];

MetricGroupId metricsGroup = new MetricGroupId("SingleThreadedChunker");
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe add an index from ctor to help identify between threads.

copy.add((T) chunk[i]);
}

processor.process(connectionManager, copy);
Copy link
Collaborator

Choose a reason for hiding this comment

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

i wonder if the "copy" list can be converted to be an immutable list.

@github-actions
Copy link

github-actions bot commented Jan 8, 2025

Test Results

619 tests  ±0   609 ✅ ±0   7m 43s ⏱️ +5s
142 suites ±0    10 💤 ±0 
142 files   ±0     0 ❌ ±0 

Results for commit 99570ee. ± Comparison against base commit e886a0c.

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