Skip to content

add performance tips page; java BatchUpdater coverage#269

Merged
brharrington merged 1 commit into
Netflix:mainfrom
brharrington:docs-cleanup-perf-tips
May 27, 2026
Merged

add performance tips page; java BatchUpdater coverage#269
brharrington merged 1 commit into
Netflix:mainfrom
brharrington:docs-cleanup-perf-tips

Conversation

@brharrington

Copy link
Copy Markdown
Contributor

Net-new docs/spectator/core/performance.md collects the cross-language patterns that previously lived in a small note on core/meters/counter or were unwritten: cache the meter reference outside hot paths, build ids with createId + withTag for dynamic dimensions, pre-aggregate in tight loops, prefer basic meters over percentile variants, keep tag cardinality bounded. Adds a Java-specific subsection on BatchUpdater (Counter/Timer/DistributionSummary expose a batchUpdater(batchSize) method that buffers updates and flushes on close).

Each Java meter page (counter, timer, dist-summary) gets a "Batch Updates" section; the counter page carries the annotated example and timer/dist-summary cross-reference it.

Removed the now-redundant high-perf-tight-loop note from core/meters/ counter.md and replaced it with a link to the new page.

Also fixed two stale links left over from the percentile merge:

  • java/meters/timer.md Percentile Timer section: Timer ->
    Timer (self-link).
  • java/meters/dist-summary.md Percentile Distribution Summary section: had an orphan "concept and storage-cost caveats" fragment from where my merge script clipped a multi-line backlink. Rewrote to a single "Use a regular Distribution Summary unless..." sentence linking the in-page anchor.

Nav: Performance Tips added under Core Concepts.

Net-new docs/spectator/core/performance.md collects the cross-language
patterns that previously lived in a small note on core/meters/counter
or were unwritten: cache the meter reference outside hot paths, build
ids with createId + withTag for dynamic dimensions, pre-aggregate in
tight loops, prefer basic meters over percentile variants, keep tag
cardinality bounded. Adds a Java-specific subsection on BatchUpdater
(Counter/Timer/DistributionSummary expose a batchUpdater(batchSize)
method that buffers updates and flushes on close).

Each Java meter page (counter, timer, dist-summary) gets a "Batch
Updates" section; the counter page carries the annotated example and
timer/dist-summary cross-reference it.

Removed the now-redundant high-perf-tight-loop note from core/meters/
counter.md and replaced it with a link to the new page.

Also fixed two stale links left over from the percentile merge:
- java/meters/timer.md Percentile Timer section: [Timer](timer.md) ->
  [Timer](#timer) (self-link).
- java/meters/dist-summary.md Percentile Distribution Summary section:
  had an orphan "concept and storage-cost caveats" fragment from where
  my merge script clipped a multi-line backlink. Rewrote to a single
  "Use a regular Distribution Summary unless..." sentence linking the
  in-page anchor.

Nav: Performance Tips added under Core Concepts.
@brharrington
brharrington merged commit 321c962 into Netflix:main May 27, 2026
1 check passed
@brharrington
brharrington deleted the docs-cleanup-perf-tips branch May 27, 2026 01:55
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