Skip to content

refactor: migrate log.Printf to structured slog logging#123

Merged
adnaan merged 1 commit intomainfrom
slog-migration
Feb 22, 2026
Merged

refactor: migrate log.Printf to structured slog logging#123
adnaan merged 1 commit intomainfrom
slog-migration

Conversation

@adnaan
Copy link
Contributor

@adnaan adnaan commented Feb 22, 2026

Summary

  • Migrate all ~95 log.Printf calls to structured slog logging across 5 production files (mount.go, template.go, session_stores.go, pubsub/redis.go, internal/upload/multipart.go)
  • Remove unused observe.Logger and observe.Trace* wrappers (zero production callers) — the observe package now only provides Metrics and Prometheus export
  • Update docs/OBSERVABILITY.md and docs/implementation-plans/MIGRATION.md to reflect direct slog usage

Closes #100

Test plan

  • All existing tests pass (GOWORK=off go test -timeout 300s ./...)
  • Zero remaining log.Printf in production code (only internal/testutil/redis.go excluded by design)
  • internal/observe package compiles and tests pass after dead code removal
  • No stale "log" imports in migrated files

🤖 Generated with Claude Code

Replace all ~95 log.Printf calls across 5 production files with
structured slog logging for consistency with the existing slog usage
in the codebase. Remove unused observe.Logger and Trace wrappers
that were never adopted in production code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 22, 2026 05:42
@claude
Copy link

claude bot commented Feb 22, 2026

PR Review: refactor: migrate log.Printf to structured slog logging

Overall this is a well-scoped refactor that makes log output significantly more useful. The direction is correct and the diff is clean. A few issues worth addressing before merge.


Bug: slog.String("error", err.Error()) — use slog.Any("error", err) instead

This pattern appears ~30 times across all changed files and is the most impactful issue:

// Current (loses error type, breaks structured error handling)
slog.Error("Mount failed", slog.String("error", err.Error()))

// Correct
slog.Error("Mount failed", slog.Any("error", err))
// or the shorthand key-value form:
slog.Error("Mount failed", "error", err)

Passing err directly lets slog handlers (e.g. JSON handlers) serialize the full error chain, and allows handlers that support it (like tint, slog-multi) to use errors.As/errors.Is for structured unwrapping. Calling .Error() degrades it to a plain string and discards everything else.


Style: Long single-line slog call needs breaking up (mount.go)

// Hard to read at ~200 characters:
slog.Warn("Connection rejected (at capacity)", slog.Int64("active", stats.ActiveConnections), slog.Int64("max", stats.MaxConnections), slog.String("group_id", groupID), slog.Int64("group_count", h.limits.GroupConnectionCount(groupID)), slog.Int64("max_per_group", stats.MaxPerGroup))

Should be formatted as:

slog.Warn("Connection rejected (at capacity)",
    slog.Int64("active", stats.ActiveConnections),
    slog.Int64("max", stats.MaxConnections),
    slog.String("group_id", groupID),
    slog.Int64("group_count", h.limits.GroupConnectionCount(groupID)),
    slog.Int64("max_per_group", stats.MaxPerGroup))

Style: Indentation inconsistency in internal/upload/multipart.go

Several slog attribute arguments are not indented relative to the call site. For example:

// Current (attributes at same indent level as the function call):
slog.Warn("Failed to remove temp file",
slog.String("entry_id", entryID),
slog.String("error", rmErr.Error()))

Should be:

slog.Warn("Failed to remove temp file",
    slog.String("entry_id", entryID),
    slog.Any("error", rmErr))

This affects multiple call sites in that file.


Concern: TraceMiddleware removal has no migration path

internal/observe/trace.go contained TraceMiddleware, GenerateTraceID, WithTraceID, and GetTraceID. These were internal, so there is no public API breakage. However, the middleware provided automatic request-ID propagation via X-Trace-ID / X-Request-ID headers — a real capability that is now completely gone.

The docs/OBSERVABILITY.md update doesn't mention this. At minimum, the docs should note that users who want request-ID correlation should wire up their own middleware (or a standard library like go.opentelemetry.io/otel). Without this callout, users may notice log correlation stops working after upgrading.

Note: the fallbackTraceID implementation in the removed code was also subtly wrong — it filled b[i] = byte(i) sequentially instead of using timestamp bytes as the comment claimed — but that's moot now.


Minor: log message prefix inconsistency

Some messages retain component prefixes ("PubSub:", "LiveHandler:", "RedisBroadcaster:", "HTTP:") while others were stripped. This makes log filtering by component harder. Choose one approach consistently:

  • Keep prefixes in the message string (current partial state): easy grep/filter but redundant in structured handlers
  • Use a structured attribute (idiomatic slog): slog.String("component", "pubsub") as a consistent key

Either is fine, but mixing makes both approaches worse. The RedisBroadcaster changes in pubsub/redis.go are consistently prefixed, while mount.go is inconsistent ("Client connected" has no prefix, "LiveHandler: starting graceful shutdown" does).


Non-issues (explicitly noted as correct)

  • Downgrading "Registered connection" and "HTTP: Using existing session group" to Debug is appropriate — these are high-frequency and were noisy at Info.
  • Using slog.Default() in observe.NewMetrics() is correct for a library.
  • The observe.Logger wrapper removal is justified: zero production callers and it was a thin layer over slog that added little value.
  • Removing the Prometheus exporter from "Future Enhancements" in the docs is correct since it is already implemented.

Summary:

  1. Replace all slog.String("error", err.Error()) with slog.Any("error", err) — consistent anti-pattern throughout, worth fixing for correctness
  2. Break up the long single-line slog call in mount.go
  3. Fix indentation of slog attribute args in multipart.go
  4. Add a docs note about TraceMiddleware removal and how to replace it

Items 2–4 are minor style issues; item 1 is the substantive one.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates production logging from log.Printf to structured log/slog calls, removes unused internal/observe logging/tracing wrappers, and updates observability/migration documentation to describe direct slog usage.

Changes:

  • Replaced log.Printf usage with structured slog.{Debug,Info,Warn,Error} across core runtime files.
  • Removed dead internal/observe trace/logger code (and its tests), leaving the package focused on metrics + Prometheus export.
  • Updated docs to describe direct slog configuration and metrics usage.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
template.go Converts template/runtime logs to structured slog calls.
mount.go Converts HTTP/WebSocket lifecycle logs to structured slog calls.
session_stores.go Migrates Redis session store logs to slog with structured fields.
pubsub/redis.go Migrates Redis pub/sub broadcaster logs to slog.
internal/upload/multipart.go Migrates multipart upload logs to slog.
internal/observe/logger.go Removes unused slog wrapper logger implementation.
internal/observe/trace.go Removes unused trace ID helpers/middleware.
internal/observe/trace_test.go Removes tests for the deleted trace functionality.
internal/observe/doc.go Updates package docs to describe metrics-focused observe package.
docs/implementation-plans/MIGRATION.md Updates migration guide examples to configure slog directly.
docs/OBSERVABILITY.md Updates observability guide to describe direct slog usage and metrics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +146 to 149
slog.Warn("Failed to remove temp file",
slog.String("entry_id", entryID),
slog.String("error", rmErr.Error()))
}
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

The attribute lines inside this slog.Warn call are not gofmt-formatted/indented (the slog.String(...) args align with slog.Warn rather than being indented under it). Please run gofmt (or fix indentation) so the call is consistently formatted and readable.

Copilot uses AI. Check for mistakes.
Comment on lines +164 to 167
slog.Warn("Failed to remove temp file",
slog.String("entry_id", entryID),
slog.String("error", rmErr.Error()))
}
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

This slog.Warn call also appears to have incorrect indentation for its attributes (likely needs gofmt). Consistent formatting matters here because this error-handling path is already nested and hard to scan.

Copilot uses AI. Check for mistakes.
// Export metrics in Prometheus text format for scraping:
//
// exporter := observe.NewPrometheusExporter(metrics, limits)
// http.Handle("/metrics", exporter)
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

The doc example suggests http.Handle("/metrics", exporter), but *observe.PrometheusExporter does not implement http.Handler (it only exposes WriteMetrics(io.Writer)). Update the example to use http.HandleFunc (or provide a Handler method) so the snippet is correct and copy/pasteable.

Suggested change
// http.Handle("/metrics", exporter)
// http.HandleFunc("/metrics", func(w http.ResponseWriter, r *http.Request) {
// exporter.WriteMetrics(w)
// })

Copilot uses AI. Check for mistakes.
↓ ↓
┌────────────────────┐ ┌───────────────────────┐
│ log/slog │ │ observe.Metrics │ ← Operational counters/gauges
│ (structured logs)│ │ PrometheusExporter │ ← /metrics endpoint
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

In the architecture diagram, PrometheusExporter is described as the /metrics endpoint, but the exporter type doesn't implement http.Handler (it exposes WriteMetrics(io.Writer)). Consider adjusting the diagram/text to show serving via http.HandleFunc (or add a ServeHTTP/Handler() helper) so the documentation matches the actual API.

Suggested change
│ (structured logs)│ │ PrometheusExporter │ ← /metrics endpoint
│ (structured logs)│ │ PrometheusExporter │ ← metrics exporter (used by /metrics handler)

Copilot uses AI. Check for mistakes.
Comment on lines 219 to 223
```go
logger.ActionReceived("increment", userID) // DO NOT use user IDs, session IDs, etc.
slog.Info("Action received",
slog.String("action", "increment"),
slog.String("user_id", userID)) // DO NOT use user IDs, session IDs, etc. in metric labels
```
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

This section is about metric cardinality/labels, but the example shown is a log event (slog.Info(...)). That can be misleading because log field cardinality has different tradeoffs than metric label cardinality. Consider rewording to clarify you're discussing metric labels, or update the example to use the metrics API / Prometheus labels instead of log attributes.

Copilot uses AI. Check for mistakes.
Comment on lines +133 to 136
"time"
"github.com/livetemplate/livetemplate"
"github.com/livetemplate/livetemplate/internal/observe"
)
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

The example imports github.com/livetemplate/livetemplate/internal/observe. Because this is an internal/ package, it cannot be imported by applications outside the github.com/livetemplate/livetemplate module (Go will reject it). If this guide is intended for library consumers, consider exposing metrics via a public package (e.g., observe at the module root) or document an alternative that doesn't require importing internal/ packages.

Copilot uses AI. Check for mistakes.
Comment on lines 154 to 158
"os"
"time"

"github.com/livetemplate/livetemplate"
"github.com/livetemplate/livetemplate/internal/observe"
)
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

This integration example imports github.com/livetemplate/livetemplate/internal/observe, which external applications cannot import due to Go's internal/ visibility rules. If this doc targets end users, it should avoid internal/ imports (e.g., provide a public metrics package or show how to use only slog plus the built-in /metrics handler if available).

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

✅ Performance Benchmark Results

Status: No significant regressions detected

Benchmark Comparison
                                               │ testdata/benchmarks/baseline.txt │  current-bench.txt   │
                                               │              sec/op              │    sec/op      vs base   │
E2ERangeOperations/add-items-8                                       66.13µ ± ∞ ¹
E2ERangeOperations/remove-items-8                                    32.82µ ± ∞ ¹
E2ERangeOperations/reorder-items-8                                   43.52µ ± ∞ ¹
E2ERangeOperations/update-items-8                                    59.12µ ± ∞ ¹
SpecificationCompliance-8                                            23.19µ ± ∞ ¹
TemplateExecuteUpdates/no-changes-8                                  19.70µ ± ∞ ¹
TemplateExecuteUpdates/small-update-8                                18.58µ ± ∞ ¹
TemplateExecuteUpdates/large-update-8                                64.83µ ± ∞ ¹
TemplateConcurrent/1-8                                               22.86µ ± ∞ ¹
TemplateConcurrent/10-8                                              21.79µ ± ∞ ¹
TemplateConcurrent/100-8                                             24.05µ ± ∞ ¹
Fingerprint_Small_Old-8                                              6.294µ ± ∞ ¹
Fingerprint_Small_New-8                                              28.23µ ± ∞ ¹
Fingerprint_Medium_Old-8                                             61.05µ ± ∞ ¹
Fingerprint_Medium_New-8                                             256.2µ ± ∞ ¹
Fingerprint_Large_Old-8                                              647.3µ ± ∞ ¹
Fingerprint_Large_New-8                                              2.694m ± ∞ ¹
Fingerprint_DeepNested_Old-8                                         63.65µ ± ∞ ¹
Fingerprint_DeepNested_New-8                                         250.4µ ± ∞ ¹
Fingerprint_Range100_Old-8                                           71.70µ ± ∞ ¹
Fingerprint_Range100_New-8                                           242.4µ ± ∞ ¹
Fingerprint_Range1000_Old-8                                          682.6µ ± ∞ ¹
Fingerprint_Range1000_New-8                                          2.371m ± ∞ ¹
Fingerprint_Allocations_Old-8                                        62.43µ ± ∞ ¹
Fingerprint_Allocations_New-8                                        255.9µ ± ∞ ¹
TreeNodeCreation/flat-8                                              573.8n ± ∞ ¹
TreeNodeCreation/nested-small-8                                      4.626µ ± ∞ ¹
TreeNodeCreation/nested-medium-8                                     13.90µ ± ∞ ¹
TreeNodeCreation/nested-large-8                                      41.63µ ± ∞ ¹
TreeNodeMarshalJSON/flat-8                                           4.096µ ± ∞ ¹
TreeNodeMarshalJSON/nested-small-8                                   47.46µ ± ∞ ¹
TreeNodeMarshalJSON/nested-medium-8                                  172.2µ ± ∞ ¹
WrapperInjection/full-html-8                                         2.982µ ± ∞ ¹
WrapperInjection/fragment-8                                          1.854µ ± ∞ ¹
ExtractWrapperContent-8                                              1.771µ ± ∞ ¹
ContextOperations/with-statics-8                                     3.685µ ± ∞ ¹
ContextOperations/without-statics-8                                  4.571µ ± ∞ ¹
TreeNodeClone/flat-8                                                 382.7n ± ∞ ¹
TreeNodeClone/nested-small-8                                         3.805µ ± ∞ ¹
TreeNodeClone/nested-medium-8                                        11.57µ ± ∞ ¹
TreeNodeToMap/flat-8                                                 688.6n ± ∞ ¹
TreeNodeToMap/nested-small-8                                         5.170µ ± ∞ ¹
TreeNodeToMap/nested-medium-8                                        15.42µ ± ∞ ¹
GenerateRandomID-8                                                   101.6n ± ∞ ¹
ExecuteTemplateWithContext_Struct-8                                  1.837µ ± ∞ ¹
ExecuteTemplateWithContext_Map-8                                     2.043µ ± ∞ ¹
CompareTreesNoChanges-8                                              440.3n ± ∞ ¹
CompareTreesSmallChange-8                                            165.5n ± ∞ ¹
CompareTreesLargeChange/10-8                                         956.7n ± ∞ ¹
CompareTreesLargeChange/100-8                                        8.356µ ± ∞ ¹
CompareTreesLargeChange/1000-8                                       109.3µ ± ∞ ¹
RangeDiffUpdate-8                                                    4.685µ ± ∞ ¹
RangeDiffInsert-8                                                    4.831µ ± ∞ ¹
RangeDiffRemove-8                                                    4.695µ ± ∞ ¹
PrepareTreeForClient/with-statics-8                                  2.061n ± ∞ ¹
PrepareTreeForClient/without-statics-8                               2.552µ ± ∞ ¹
Parse/simple-8                                                       1.932µ ± ∞ ¹
Parse/conditional-8                                                  2.898µ ± ∞ ¹
Parse/range-8                                                        2.938µ ± ∞ ¹
Parse/nested-8                                                       3.890µ ± ∞ ¹
Parse/complex-8                                                      6.410µ ± ∞ ¹
BuildTree/simple-8                                                   6.167µ ± ∞ ¹
BuildTree/conditional-true-8                                         19.36µ ± ∞ ¹
BuildTree/conditional-false-8                                        5.942µ ± ∞ ¹
BuildTree/range-small-8                                              20.66µ ± ∞ ¹
BuildTreeScale/small-10-8                                            69.43µ ± ∞ ¹
BuildTreeScale/medium-100-8                                          672.8µ ± ∞ ¹
BuildTreeScale/large-1000-8                                          8.267m ± ∞ ¹
NodeRender-8                                                         74.22n ± ∞ ¹
TreeToHTML/simple-8                                                  119.4n ± ∞ ¹
TreeToHTML/nested-8                                                  218.1n ± ∞ ¹
TreeToHTML/with-ranges-8                                             187.3n ± ∞ ¹
TreeToHTMLScale/small-10-8                                           783.3n ± ∞ ¹
TreeToHTMLScale/medium-100-8                                         6.283µ ± ∞ ¹
TreeToHTMLScale/large-1000-8                                         63.07µ ± ∞ ¹
IsVoidElement-8                                                      86.31n ± ∞ ¹
NodeRenderComplex-8                                                  200.4n ± ∞ ¹
MinifyHTML-8                                                         975.0n ± ∞ ¹
ParseActionFromHTTP-8                                                1.710µ ± ∞ ¹
ParseActionFromWebSocket-8                                           675.1n ± ∞ ¹
PrepareUpdate/without-errors-8                                      0.3124n ± ∞ ¹
PrepareUpdate/with-errors-8                                          15.33n ± ∞ ¹
SerializeUpdate-8                                                    856.2n ± ∞ ¹
PrepareAndSerialize/simple-update-8                                  923.9n ± ∞ ¹
PrepareAndSerialize/with-metadata-8                                  1.178µ ± ∞ ¹
ParseActionScale/small-http-8                                        1.718µ ± ∞ ¹
ParseActionScale/small-ws-8                                          649.3n ± ∞ ¹
ParseActionScale/medium-http-8                                       2.850µ ± ∞ ¹
ParseActionScale/medium-ws-8                                         1.289µ ± ∞ ¹
ParseActionScale/large-http-8                                        3.719µ ± ∞ ¹
ParseActionScale/large-ws-8                                          2.339µ ± ∞ ¹
SerializeUpdateScale/simple-8                                        874.3n ± ∞ ¹
SerializeUpdateScale/nested-8                                        1.919µ ± ∞ ¹
SerializeUpdateScale/multiple-fields-8                               1.476µ ± ∞ ¹
DispatchWithState_Cached-4                                                           431.0n ± ∞ ¹
E2EUserJourney-4                                                                     3.624m ± ∞ ¹
E2ETodoApp-4                                                                         243.0µ ± ∞ ¹
E2ERangeOperations/add-items-4                                                       129.1µ ± ∞ ¹
E2ERangeOperations/remove-items-4                                                    69.85µ ± ∞ ¹
E2ERangeOperations/reorder-items-4                                                   90.89µ ± ∞ ¹
E2ERangeOperations/update-items-4                                                    91.09µ ± ∞ ¹
E2EMultipleSessions/sessions-1-4                                                     36.09µ ± ∞ ¹
E2EMultipleSessions/sessions-10-4                                                    364.8µ ± ∞ ¹
E2EMultipleSessions/sessions-100-4                                                   3.593m ± ∞ ¹
SpecificationCompliance-4                                                            32.94µ ± ∞ ¹
ErrorPaths/invalid-template-syntax-4                                                 1.257m ± ∞ ¹
ErrorPaths/missing-field-4                                                           34.75µ ± ∞ ¹
ErrorPaths/nil-data-4                                                                33.65µ ± ∞ ¹
ErrorPaths/empty-template-4                                                          1.290m ± ∞ ¹
TemplateExecute/initial-render-4                                                     1.337m ± ∞ ¹
TemplateExecute/subsequent-render-4                                                  37.19µ ± ∞ ¹
TemplateExecuteUpdates/no-changes-4                                                  35.25µ ± ∞ ¹
TemplateExecuteUpdates/small-update-4                                                35.14µ ± ∞ ¹
TemplateExecuteUpdates/large-update-4                                                120.0µ ± ∞ ¹
TemplateComplexity/simple-fields-4                                                   74.96µ ± ∞ ¹
TemplateComplexity/with-conditionals-4                                               60.55µ ± ∞ ¹
TemplateComplexity/with-ranges-4                                                     97.33µ ± ∞ ¹
TemplateComplexity/deeply-nested-4                                                   83.96µ ± ∞ ¹
TemplateConcurrent/goroutines-1-4                                                    50.50µ ± ∞ ¹
TemplateConcurrent/goroutines-10-4                                                   59.27µ ± ∞ ¹
TemplateConcurrent/goroutines-100-4                                                  61.00µ ± ∞ ¹
Template_Execute-4                                                                   36.20µ ± ∞ ¹
Template_ExecuteUpdates-4                                                            35.00µ ± ∞ ¹
TreeNodeCreation/flat-4                                                              1.046µ ± ∞ ¹
TreeNodeCreation/nested-small-4                                                      7.993µ ± ∞ ¹
TreeNodeCreation/nested-medium-4                                                     24.37µ ± ∞ ¹
TreeNodeCreation/nested-large-4                                                      73.92µ ± ∞ ¹
TreeNodeMarshalJSON/flat-4                                                           7.045µ ± ∞ ¹
TreeNodeMarshalJSON/nested-small-4                                                   73.73µ ± ∞ ¹
TreeNodeMarshalJSON/nested-medium-4                                                  265.8µ ± ∞ ¹
WrapperInjection/full-html-4                                                         5.740µ ± ∞ ¹
WrapperInjection/fragment-4                                                          3.674µ ± ∞ ¹
ExtractWrapperContent-4                                                              3.553µ ± ∞ ¹
ContextOperations/with-statics-4                                                     5.900µ ± ∞ ¹
ContextOperations/without-statics-4                                                  6.000µ ± ∞ ¹
TreeNodeClone/flat-4                                                                 698.7n ± ∞ ¹
TreeNodeClone/nested-small-4                                                         5.943µ ± ∞ ¹
TreeNodeClone/nested-medium-4                                                        18.33µ ± ∞ ¹
TreeNodeToMap/flat-4                                                                 1.071µ ± ∞ ¹
TreeNodeToMap/nested-small-4                                                         7.788µ ± ∞ ¹
TreeNodeToMap/nested-medium-4                                                        23.80µ ± ∞ ¹
GenerateRandomID-4                                                                   93.64n ± ∞ ¹
CalculateStructureFingerprint_Small-4                                                642.0n ± ∞ ¹
CalculateStructureFingerprint_Medium-4                                               13.62µ ± ∞ ¹
CalculateStructureFingerprint_Large-4                                                136.3µ ± ∞ ¹
CalculateStructureFingerprint_DeepNested-4                                           11.23µ ± ∞ ¹
CalculateStructureFingerprint_Range100-4                                             652.6n ± ∞ ¹
CalculateStructureFingerprint_Range1000-4                                            663.3n ± ∞ ¹
ExecuteTemplateWithContext_Struct-4                                                  3.465µ ± ∞ ¹
ExecuteTemplateWithContext_Map-4                                                     3.744µ ± ∞ ¹
CompareTreesNoChanges-4                                                              678.5n ± ∞ ¹
CompareTreesSmallChange-4                                                            291.4n ± ∞ ¹
CompareTreesLargeChange/10-4                                                         1.528µ ± ∞ ¹
CompareTreesLargeChange/100-4                                                        14.51µ ± ∞ ¹
CompareTreesLargeChange/1000-4                                                       195.4µ ± ∞ ¹
RangeDiffUpdate-4                                                                    9.009µ ± ∞ ¹
RangeDiffInsert-4                                                                    9.004µ ± ∞ ¹
RangeDiffRemove-4                                                                    8.928µ ± ∞ ¹
PrepareTreeForClient/with-statics-4                                                  2.493n ± ∞ ¹
PrepareTreeForClient/without-statics-4                                               4.662µ ± ∞ ¹
ClientNeedsStatics_SameStructure-4                                                   6.223n ± ∞ ¹
ClientNeedsStatics_DifferentStructure-4                                              5.605n ± ∞ ¹
ClientNeedsStatics_DeepNested-4                                                      6.226n ± ∞ ¹
ClientNeedsStatics_Range-4                                                           5.916n ± ∞ ¹
ClientNeedsStatics_NilOld-4                                                          2.178n ± ∞ ¹
WireSize_WithStatics-4                                                               9.811µ ± ∞ ¹
WireSize_WithoutStatics-4                                                            10.36µ ± ∞ ¹
WireSizeComparison/small_5_with_statics-4                                            2.701µ ± ∞ ¹
WireSizeComparison/small_5_without_statics-4                                         2.365µ ± ∞ ¹
WireSizeComparison/medium_20_with_statics-4                                          9.759µ ± ∞ ¹
WireSizeComparison/medium_20_without_statics-4                                       10.33µ ± ∞ ¹
WireSizeComparison/large_100_with_statics-4                                          45.40µ ± ∞ ¹
WireSizeComparison/large_100_without_statics-4                                       50.42µ ± ∞ ¹
Parse/simple-4                                                                       3.270µ ± ∞ ¹
Parse/conditional-4                                                                  5.866µ ± ∞ ¹
Parse/range-4                                                                        5.141µ ± ∞ ¹
Parse/nested-4                                                                       6.685µ ± ∞ ¹
Parse/complex-4                                                                      12.82µ ± ∞ ¹
BuildTree/simple-4                                                                   11.96µ ± ∞ ¹
BuildTree/conditional-true-4                                                         23.46µ ± ∞ ¹
BuildTree/conditional-false-4                                                        11.37µ ± ∞ ¹
BuildTree/range-small-4                                                              43.54µ ± ∞ ¹
BuildTreeScale/small-10-4                                                            138.8µ ± ∞ ¹
BuildTreeScale/medium-100-4                                                          1.391m ± ∞ ¹
BuildTreeScale/large-1000-4                                                          15.48m ± ∞ ¹
NodeRender-4                                                                         114.3n ± ∞ ¹
TreeToHTML/simple-4                                                                  204.4n ± ∞ ¹
TreeToHTML/nested-4                                                                  333.6n ± ∞ ¹
TreeToHTML/with-ranges-4                                                             316.2n ± ∞ ¹
TreeToHTMLScale/small-10-4                                                           1.296µ ± ∞ ¹
TreeToHTMLScale/medium-100-4                                                         11.15µ ± ∞ ¹
TreeToHTMLScale/large-1000-4                                                         115.4µ ± ∞ ¹
IsVoidElement-4                                                                      94.32n ± ∞ ¹
NodeRenderComplex-4                                                                  304.2n ± ∞ ¹
MinifyHTML-4                                                                         1.615µ ± ∞ ¹
ParseActionFromHTTP-4                                                                3.781µ ± ∞ ¹
ParseActionFromWebSocket-4                                                           1.366µ ± ∞ ¹
PrepareUpdate/without-errors-4                                                      0.3116n ± ∞ ¹
PrepareUpdate/with-errors-4                                                          26.83n ± ∞ ¹
SerializeUpdate-4                                                                    1.607µ ± ∞ ¹
PrepareAndSerialize/simple-update-4                                                  1.648µ ± ∞ ¹
PrepareAndSerialize/with-metadata-4                                                  2.085µ ± ∞ ¹
ParseActionScale/small-http-4                                                        3.794µ ± ∞ ¹
ParseActionScale/small-ws-4                                                          1.307µ ± ∞ ¹
ParseActionScale/medium-http-4                                                       4.850µ ± ∞ ¹
ParseActionScale/medium-ws-4                                                         2.352µ ± ∞ ¹
ParseActionScale/large-http-4                                                        7.123µ ± ∞ ¹
ParseActionScale/large-ws-4                                                          4.550µ ± ∞ ¹
SerializeUpdateScale/simple-4                                                        1.619µ ± ∞ ¹
SerializeUpdateScale/nested-4                                                        3.382µ ± ∞ ¹
SerializeUpdateScale/multiple-fields-4                                               2.661µ ± ∞ ¹
ConcurrentConnections/100_connections-4                                              26.00µ ± ∞ ¹
ConcurrentConnections/:00_connections-4                                              272.1µ ± ∞ ¹
RegisterUnregister-4                                                                 4.455µ ± ∞ ¹
GetByGroup-4                                                                         416.0n ± ∞ ¹
CloseConnection-4                                                                    6.541µ ± ∞ ¹
MemoryUsage-4                                                                        72.11µ ± ∞ ¹
BroadcastToGroup-4                                                                   24.33µ ± ∞ ¹
ConcurrentRegistrations-4                                                            4.465µ ± ∞ ¹
GetByGroupExcept-4                                                                   516.1n ± ∞ ¹
geomean                                                              5.754µ          6.957µ        ? ² ³
¹ need >= 6 samples for confidence interval at level 0.95
² benchmark set differs from baseline; geomeans may not be comparable
³ ratios must be >0 to compute geomean

                                               │ testdata/benchmarks/baseline.txt │   current-bench.txt    │
                                               │               B/op               │     B/op       vs base │
E2ERangeOperations/add-items-8                                      80.55Ki ± ∞ ¹
E2ERangeOperations/remove-items-8                                   43.62Ki ± ∞ ¹
E2ERangeOperations/reorder-items-8                                  56.91Ki ± ∞ ¹
E2ERangeOperations/update-items-8                                   56.91Ki ± ∞ ¹
SpecificationCompliance-8                                           27.32Ki ± ∞ ¹
TemplateExecuteUpdates/no-changes-8                                 27.39Ki ± ∞ ¹
TemplateExecuteUpdates/small-update-8                               27.39Ki ± ∞ ¹
TemplateExecuteUpdates/large-update-8                               76.23Ki ± ∞ ¹
TemplateConcurrent/1-8                                              28.32Ki ± ∞ ¹
TemplateConcurrent/10-8                                             28.33Ki ± ∞ ¹
TemplateConcurrent/100-8                                            28.33Ki ± ∞ ¹
Fingerprint_Small_Old-8                                             2.688Ki ± ∞ ¹
Fingerprint_Small_New-8                                             13.36Ki ± ∞ ¹
Fingerprint_Medium_Old-8                                            24.85Ki ± ∞ ¹
Fingerprint_Medium_New-8                                            125.3Ki ± ∞ ¹
Fingerprint_Large_Old-8                                             237.7Ki ± ∞ ¹
Fingerprint_Large_New-8                                             1.352Mi ± ∞ ¹
Fingerprint_DeepNested_Old-8                                        30.53Ki ± ∞ ¹
Fingerprint_DeepNested_New-8                                        124.8Ki ± ∞ ¹
Fingerprint_Range100_Old-8                                          36.38Ki ± ∞ ¹
Fingerprint_Range100_New-8                                          154.6Ki ± ∞ ¹
Fingerprint_Range1000_Old-8                                         372.4Ki ± ∞ ¹
Fingerprint_Range1000_New-8                                         1.504Mi ± ∞ ¹
Fingerprint_Allocations_Old-8                                       24.85Ki ± ∞ ¹
Fingerprint_Allocations_New-8                                       125.3Ki ± ∞ ¹
TreeNodeCreation/flat-8                                             1.188Ki ± ∞ ¹
TreeNodeCreation/nested-small-8                                     9.691Ki ± ∞ ¹
TreeNodeCreation/nested-medium-8                                    29.53Ki ± ∞ ¹
TreeNodeCreation/nested-large-8                                     89.04Ki ± ∞ ¹
TreeNodeMarshalJSON/flat-8                                          3.472Ki ± ∞ ¹
TreeNodeMarshalJSON/nested-small-8                                  27.29Ki ± ∞ ¹
TreeNodeMarshalJSON/nested-medium-8                                 89.07Ki ± ∞ ¹
WrapperInjection/full-html-8                                        6.930Ki ± ∞ ¹
WrapperInjection/fragment-8                                         6.266Ki ± ∞ ¹
ExtractWrapperContent-8                                             5.883Ki ± ∞ ¹
ContextOperations/with-statics-8                                    8.422Ki ± ∞ ¹
ContextOperations/without-statics-8                                 8.422Ki ± ∞ ¹
TreeNodeClone/flat-8                                                  976.0 ± ∞ ¹
TreeNodeClone/nested-small-8                                        8.422Ki ± ∞ ¹
TreeNodeClone/nested-medium-8                                       25.72Ki ± ∞ ¹
TreeNodeToMap/flat-8                                                2.109Ki ± ∞ ¹
TreeNodeToMap/nested-small-8                                        14.06Ki ± ∞ ¹
TreeNodeToMap/nested-medium-8                                       42.54Ki ± ∞ ¹
GenerateRandomID-8                                                    24.00 ± ∞ ¹
ExecuteTemplateWithContext_Struct-8                                 1.002Ki ± ∞ ¹
ExecuteTemplateWithContext_Map-8                                    1.174Ki ± ∞ ¹
CompareTreesNoChanges-8                                               112.0 ± ∞ ¹
CompareTreesSmallChange-8                                             400.0 ± ∞ ¹
CompareTreesLargeChange/10-8                                         1016.0 ± ∞ ¹
CompareTreesLargeChange/100-8                                       9.211Ki ± ∞ ¹
CompareTreesLargeChange/1000-8                                      156.6Ki ± ∞ ¹
RangeDiffUpdate-8                                                   18.59Ki ± ∞ ¹
RangeDiffInsert-8                                                   18.59Ki ± ∞ ¹
RangeDiffRemove-8                                                   18.59Ki ± ∞ ¹
PrepareTreeForClient/with-statics-8                                   0.000 ± ∞ ¹
PrepareTreeForClient/without-statics-8                              4.898Ki ± ∞ ¹
Parse/simple-8                                                      3.656Ki ± ∞ ¹
Parse/conditional-8                                                 4.398Ki ± ∞ ¹
Parse/range-8                                                       4.234Ki ± ∞ ¹
Parse/nested-8                                                      4.609Ki ± ∞ ¹
Parse/complex-8                                                     6.906Ki ± ∞ ¹
BuildTree/simple-8                                                  10.93Ki ± ∞ ¹
BuildTree/conditional-true-8                                        21.32Ki ± ∞ ¹
BuildTree/conditional-false-8                                       10.67Ki ± ∞ ¹
BuildTree/range-small-8                                             34.97Ki ± ∞ ¹
BuildTreeScale/small-10-8                                           113.8Ki ± ∞ ¹
BuildTreeScale/medium-100-8                                         1.101Mi ± ∞ ¹
BuildTreeScale/large-1000-8                                         11.02Mi ± ∞ ¹
NodeRender-8                                                          56.00 ± ∞ ¹
TreeToHTML/simple-8                                                   64.00 ± ∞ ¹
TreeToHTML/nested-8                                                   144.0 ± ∞ ¹
TreeToHTML/with-ranges-8                                              72.00 ± ∞ ¹
TreeToHTMLScale/small-10-8                                            544.0 ± ∞ ¹
TreeToHTMLScale/medium-100-8                                        3.634Ki ± ∞ ¹
TreeToHTMLScale/large-1000-8                                        65.43Ki ± ∞ ¹
IsVoidElement-8                                                       0.000 ± ∞ ¹
NodeRenderComplex-8                                                   248.0 ± ∞ ¹
MinifyHTML-8                                                        1.641Ki ± ∞ ¹
ParseActionFromHTTP-8                                               6.799Ki ± ∞ ¹
ParseActionFromWebSocket-8                                            656.0 ± ∞ ¹
PrepareUpdate/without-errors-8                                        0.000 ± ∞ ¹
PrepareUpdate/with-errors-8                                           32.00 ± ∞ ¹
SerializeUpdate-8                                                     648.0 ± ∞ ¹
PrepareAndSerialize/simple-update-8                                   672.0 ± ∞ ¹
PrepareAndSerialize/with-metadata-8                                   848.0 ± ∞ ¹
ParseActionScale/small-http-8                                       6.791Ki ± ∞ ¹
ParseActionScale/small-ws-8                                           648.0 ± ∞ ¹
ParseActionScale/medium-http-8                                      6.955Ki ± ∞ ¹
ParseActionScale/medium-ws-8                                          760.0 ± ∞ ¹
ParseActionScale/large-http-8                                       7.885Ki ± ∞ ¹
ParseActionScale/large-ws-8                                         1.578Ki ± ∞ ¹
SerializeUpdateScale/simple-8                                         648.0 ± ∞ ¹
SerializeUpdateScale/nested-8                                       1.282Ki ± ∞ ¹
SerializeUpdateScale/multiple-fields-8                                968.0 ± ∞ ¹
DispatchWithState_Cached-4                                                            80.00 ± ∞ ¹
E2EUserJourney-4                                                                    2.788Mi ± ∞ ¹
E2ETodoApp-4                                                                        142.0Ki ± ∞ ¹
E2ERangeOperations/add-items-4                                                      82.84Ki ± ∞ ¹
E2ERangeOperations/remove-items-4                                                   44.88Ki ± ∞ ¹
E2ERangeOperations/reorder-items-4                                                  58.51Ki ± ∞ ¹
E2ERangeOperations/update-items-4                                                   58.51Ki ± ∞ ¹
E2EMultipleSessions/sessions-1-4                                                    28.53Ki ± ∞ ¹
E2EMultipleSessions/sessions-10-4                                                   285.2Ki ± ∞ ¹
E2EMultipleSessions/sessions-100-4                                                  2.783Mi ± ∞ ¹
SpecificationCompliance-4                                                           27.58Ki ± ∞ ¹
ErrorPaths/invalid-template-syntax-4                                                297.6Ki ± ∞ ¹
ErrorPaths/missing-field-4                                                          28.27Ki ± ∞ ¹
ErrorPaths/nil-data-4                                                               27.41Ki ± ∞ ¹
ErrorPaths/empty-template-4                                                         324.6Ki ± ∞ ¹
TemplateExecute/initial-render-4                                                    338.7Ki ± ∞ ¹
TemplateExecute/subsequent-render-4                                                 28.62Ki ± ∞ ¹
TemplateExecuteUpdates/no-changes-4                                                 27.66Ki ± ∞ ¹
TemplateExecuteUpdates/small-update-4                                               27.66Ki ± ∞ ¹
TemplateExecuteUpdates/large-update-4                                               76.79Ki ± ∞ ¹
TemplateComplexity/simple-fields-4                                                  51.14Ki ± ∞ ¹
TemplateComplexity/with-conditionals-4                                              40.57Ki ± ∞ ¹
TemplateComplexity/with-ranges-4                                                    59.36Ki ± ∞ ¹
TemplateComplexity/deeply-nested-4                                                  48.83Ki ± ∞ ¹
TemplateConcurrent/goroutines-1-4                                                   28.62Ki ± ∞ ¹
TemplateConcurrent/goroutines-10-4                                                  28.62Ki ± ∞ ¹
TemplateConcurrent/goroutines-100-4                                                 28.63Ki ± ∞ ¹
Template_Execute-4                                                                  28.82Ki ± ∞ ¹
Template_ExecuteUpdates-4                                                           27.80Ki ± ∞ ¹
TreeNodeCreation/flat-4                                                             1.281Ki ± ∞ ¹
TreeNodeCreation/nested-small-4                                                     10.31Ki ± ∞ ¹
TreeNodeCreation/nested-medium-4                                                    31.41Ki ± ∞ ¹
TreeNodeCreation/nested-large-4                                                     94.71Ki ± ∞ ¹
TreeNodeMarshalJSON/flat-4                                                          3.471Ki ± ∞ ¹
TreeNodeMarshalJSON/nested-small-4                                                  27.27Ki ± ∞ ¹
TreeNodeMarshalJSON/nested-medium-4                                                 88.97Ki ± ∞ ¹
WrapperInjection/full-html-4                                                        6.930Ki ± ∞ ¹
WrapperInjection/fragment-4                                                         6.266Ki ± ∞ ¹
ExtractWrapperContent-4                                                             5.883Ki ± ∞ ¹
ContextOperations/with-statics-4                                                    9.047Ki ± ∞ ¹
ContextOperations/without-statics-4                                                 9.047Ki ± ∞ ¹
TreeNodeClone/flat-4                                                                1.047Ki ± ∞ ¹
TreeNodeClone/nested-small-4                                                        9.047Ki ± ∞ ¹
TreeNodeClone/nested-medium-4                                                       27.61Ki ± ∞ ¹
TreeNodeToMap/flat-4                                                                2.109Ki ± ∞ ¹
TreeNodeToMap/nested-small-4                                                        14.06Ki ± ∞ ¹
TreeNodeToMap/nested-medium-4                                                       42.54Ki ± ∞ ¹
GenerateRandomID-4                                                                    24.00 ± ∞ ¹
CalculateStructureFingerprint_Small-4                                                 192.0 ± ∞ ¹
CalculateStructureFingerprint_Medium-4                                              1.898Ki ± ∞ ¹
CalculateStructureFingerprint_Large-4                                               24.60Ki ± ∞ ¹
CalculateStructureFingerprint_DeepNested-4                                          2.078Ki ± ∞ ¹
CalculateStructureFingerprint_Range100-4                                              208.0 ± ∞ ¹
CalculateStructureFingerprint_Range1000-4                                             208.0 ± ∞ ¹
ExecuteTemplateWithContext_Struct-4                                                 1.018Ki ± ∞ ¹
ExecuteTemplateWithContext_Map-4                                                    1.189Ki ± ∞ ¹
CompareTreesNoChanges-4                                                               128.0 ± ∞ ¹
CompareTreesSmallChange-4                                                             416.0 ± ∞ ¹
CompareTreesLargeChange/10-4                                                        1.008Ki ± ∞ ¹
CompareTreesLargeChange/100-4                                                       9.227Ki ± ∞ ¹
CompareTreesLargeChange/1000-4                                                      156.7Ki ± ∞ ¹
RangeDiffUpdate-4                                                                   18.50Ki ± ∞ ¹
RangeDiffInsert-4                                                                   18.50Ki ± ∞ ¹
RangeDiffRemove-4                                                                   18.50Ki ± ∞ ¹
PrepareTreeForClient/with-statics-4                                                   0.000 ± ∞ ¹
PrepareTreeForClient/without-statics-4                                              4.914Ki ± ∞ ¹
ClientNeedsStatics_SameStructure-4                                                    0.000 ± ∞ ¹
ClientNeedsStatics_DifferentStructure-4                                               0.000 ± ∞ ¹
ClientNeedsStatics_DeepNested-4                                                       0.000 ± ∞ ¹
ClientNeedsStatics_Range-4                                                            0.000 ± ∞ ¹
ClientNeedsStatics_NilOld-4                                                           0.000 ± ∞ ¹
WireSize_WithStatics-4                                                              4.269Ki ± ∞ ¹
WireSize_WithoutStatics-4                                                           5.378Ki ± ∞ ¹
WireSizeComparison/small_5_with_statics-4                                            1016.0 ± ∞ ¹
WireSizeComparison/small_5_without_statics-4                                        1.219Ki ± ∞ ¹
WireSizeComparison/medium_20_with_statics-4                                         4.269Ki ± ∞ ¹
WireSizeComparison/medium_20_without_statics-4                                      5.378Ki ± ∞ ¹
WireSizeComparison/large_100_with_statics-4                                         18.81Ki ± ∞ ¹
WireSizeComparison/large_100_without_statics-4                                      23.70Ki ± ∞ ¹
Parse/simple-4                                                                      3.656Ki ± ∞ ¹
Parse/conditional-4                                                                 4.398Ki ± ∞ ¹
Parse/range-4                                                                       4.234Ki ± ∞ ¹
Parse/nested-4                                                                      4.609Ki ± ∞ ¹
Parse/complex-4                                                                     6.906Ki ± ∞ ¹
BuildTree/simple-4                                                                  10.97Ki ± ∞ ¹
BuildTree/conditional-true-4                                                        21.41Ki ± ∞ ¹
BuildTree/conditional-false-4                                                       10.74Ki ± ∞ ¹
BuildTree/range-small-4                                                             36.05Ki ± ∞ ¹
BuildTreeScale/small-10-4                                                           117.1Ki ± ∞ ¹
BuildTreeScale/medium-100-4                                                         1.134Mi ± ∞ ¹
BuildTreeScale/large-1000-4                                                         11.35Mi ± ∞ ¹
NodeRender-4                                                                          56.00 ± ∞ ¹
TreeToHTML/simple-4                                                                   64.00 ± ∞ ¹
TreeToHTML/nested-4                                                                   144.0 ± ∞ ¹
TreeToHTML/with-ranges-4                                                              72.00 ± ∞ ¹
TreeToHTMLScale/small-10-4                                                            544.0 ± ∞ ¹
TreeToHTMLScale/medium-100-4                                                        3.633Ki ± ∞ ¹
TreeToHTMLScale/large-1000-4                                                        65.41Ki ± ∞ ¹
IsVoidElement-4                                                                       0.000 ± ∞ ¹
NodeRenderComplex-4                                                                   248.0 ± ∞ ¹
MinifyHTML-4                                                                        1.641Ki ± ∞ ¹
ParseActionFromHTTP-4                                                               6.798Ki ± ∞ ¹
ParseActionFromWebSocket-4                                                            656.0 ± ∞ ¹
PrepareUpdate/without-errors-4                                                        0.000 ± ∞ ¹
PrepareUpdate/with-errors-4                                                           32.00 ± ∞ ¹
SerializeUpdate-4                                                                     648.0 ± ∞ ¹
PrepareAndSerialize/simple-update-4                                                   672.0 ± ∞ ¹
PrepareAndSerialize/with-metadata-4                                                   848.0 ± ∞ ¹
ParseActionScale/small-http-4                                                       6.790Ki ± ∞ ¹
ParseActionScale/small-ws-4                                                           648.0 ± ∞ ¹
ParseActionScale/medium-http-4                                                      6.954Ki ± ∞ ¹
ParseActionScale/medium-ws-4                                                          760.0 ± ∞ ¹
ParseActionScale/large-http-4                                                       7.884Ki ± ∞ ¹
ParseActionScale/large-ws-4                                                         1.578Ki ± ∞ ¹
SerializeUpdateScale/simple-4                                                         648.0 ± ∞ ¹
SerializeUpdateScale/nested-4                                                       1.281Ki ± ∞ ¹
SerializeUpdateScale/multiple-fields-4                                                968.0 ± ∞ ¹
ConcurrentConnections/100_connections-4                                             3.516Ki ± ∞ ¹
ConcurrentConnections/:00_connections-4                                             35.16Ki ± ∞ ¹
RegisterUnregister-4                                                                1.182Ki ± ∞ ¹
GetByGroup-4                                                                          896.0 ± ∞ ¹
CloseConnection-4                                                                     259.0 ± ∞ ¹
MemoryUsage-4                                                                       95.70Ki ± ∞ ¹
BroadcastToGroup-4                                                                  4.000Ki ± ∞ ¹
ConcurrentRegistrations-4                                                           1.185Ki ± ∞ ¹
GetByGroupExcept-4                                                                    896.0 ± ∞ ¹
geomean                                                                         ²                  ? ³ ² ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² summaries must be >0 to compute geomean
³ benchmark set differs from baseline; geomeans may not be comparable
⁴ ratios must be >0 to compute geomean

                                               │ testdata/benchmarks/baseline.txt │   current-bench.txt   │
                                               │            allocs/op             │  allocs/op    vs base │
E2ERangeOperations/add-items-8                                        756.0 ± ∞ ¹
E2ERangeOperations/remove-items-8                                     405.0 ± ∞ ¹
E2ERangeOperations/reorder-items-8                                    525.0 ± ∞ ¹
E2ERangeOperations/update-items-8                                     525.0 ± ∞ ¹
SpecificationCompliance-8                                             213.0 ± ∞ ¹
TemplateExecuteUpdates/no-changes-8                                   221.0 ± ∞ ¹
TemplateExecuteUpdates/small-update-8                                 221.0 ± ∞ ¹
TemplateExecuteUpdates/large-update-8                                 728.0 ± ∞ ¹
TemplateConcurrent/1-8                                                237.0 ± ∞ ¹
TemplateConcurrent/10-8                                               237.0 ± ∞ ¹
TemplateConcurrent/100-8                                              237.0 ± ∞ ¹
Fingerprint_Small_Old-8                                               71.00 ± ∞ ¹
Fingerprint_Small_New-8                                               386.0 ± ∞ ¹
Fingerprint_Medium_Old-8                                              614.0 ± ∞ ¹
Fingerprint_Medium_New-8                                             3.548k ± ∞ ¹
Fingerprint_Large_Old-8                                              6.017k ± ∞ ¹
Fingerprint_Large_New-8                                              35.07k ± ∞ ¹
Fingerprint_DeepNested_Old-8                                          768.0 ± ∞ ¹
Fingerprint_DeepNested_New-8                                         3.069k ± ∞ ¹
Fingerprint_Range100_Old-8                                           1.012k ± ∞ ¹
Fingerprint_Range100_New-8                                           3.082k ± ∞ ¹
Fingerprint_Range1000_Old-8                                          10.01k ± ∞ ¹
Fingerprint_Range1000_New-8                                          30.09k ± ∞ ¹
Fingerprint_Allocations_Old-8                                         614.0 ± ∞ ¹
Fingerprint_Allocations_New-8                                        3.548k ± ∞ ¹
TreeNodeCreation/flat-8                                               19.00 ± ∞ ¹
TreeNodeCreation/nested-small-8                                       133.0 ± ∞ ¹
TreeNodeCreation/nested-medium-8                                      403.0 ± ∞ ¹
TreeNodeCreation/nested-large-8                                      1.213k ± ∞ ¹
TreeNodeMarshalJSON/flat-8                                            52.00 ± ∞ ¹
TreeNodeMarshalJSON/nested-small-8                                    358.0 ± ∞ ¹
TreeNodeMarshalJSON/nested-medium-8                                  1.087k ± ∞ ¹
WrapperInjection/full-html-8                                          37.00 ± ∞ ¹
WrapperInjection/fragment-8                                           28.00 ± ∞ ¹
ExtractWrapperContent-8                                               28.00 ± ∞ ¹
ContextOperations/with-statics-8                                      106.0 ± ∞ ¹
ContextOperations/without-statics-8                                   106.0 ± ∞ ¹
TreeNodeClone/flat-8                                                  14.00 ± ∞ ¹
TreeNodeClone/nested-small-8                                          106.0 ± ∞ ¹
TreeNodeClone/nested-medium-8                                         322.0 ± ∞ ¹
TreeNodeToMap/flat-8                                                  18.00 ± ∞ ¹
TreeNodeToMap/nested-small-8                                          120.0 ± ∞ ¹
TreeNodeToMap/nested-medium-8                                         363.0 ± ∞ ¹
GenerateRandomID-8                                                    1.000 ± ∞ ¹
ExecuteTemplateWithContext_Struct-8                                   29.00 ± ∞ ¹
ExecuteTemplateWithContext_Map-8                                      36.00 ± ∞ ¹
CompareTreesNoChanges-8                                               2.000 ± ∞ ¹
CompareTreesSmallChange-8                                             3.000 ± ∞ ¹
CompareTreesLargeChange/10-8                                          6.000 ± ∞ ¹
CompareTreesLargeChange/100-8                                         12.00 ± ∞ ¹
CompareTreesLargeChange/1000-8                                        23.00 ± ∞ ¹
RangeDiffUpdate-8                                                     36.00 ± ∞ ¹
RangeDiffInsert-8                                                     36.00 ± ∞ ¹
RangeDiffRemove-8                                                     36.00 ± ∞ ¹
PrepareTreeForClient/with-statics-8                                   0.000 ± ∞ ¹
PrepareTreeForClient/without-statics-8                                5.000 ± ∞ ¹
Parse/simple-8                                                        43.00 ± ∞ ¹
Parse/conditional-8                                                   64.00 ± ∞ ¹
Parse/range-8                                                         59.00 ± ∞ ¹
Parse/nested-8                                                        69.00 ± ∞ ¹
Parse/complex-8                                                       126.0 ± ∞ ¹
BuildTree/simple-8                                                    101.0 ± ∞ ¹
BuildTree/conditional-true-8                                          197.0 ± ∞ ¹
BuildTree/conditional-false-8                                         103.0 ± ∞ ¹
BuildTree/range-small-8                                               350.0 ± ∞ ¹
BuildTreeScale/small-10-8                                            1.101k ± ∞ ¹
BuildTreeScale/medium-100-8                                          10.74k ± ∞ ¹
BuildTreeScale/large-1000-8                                          107.1k ± ∞ ¹
NodeRender-8                                                          3.000 ± ∞ ¹
TreeToHTML/simple-8                                                   4.000 ± ∞ ¹
TreeToHTML/nested-8                                                   7.000 ± ∞ ¹
TreeToHTML/with-ranges-8                                              5.000 ± ∞ ¹
TreeToHTMLScale/small-10-8                                            16.00 ± ∞ ¹
TreeToHTMLScale/medium-100-8                                          109.0 ± ∞ ¹
TreeToHTMLScale/large-1000-8                                         1.017k ± ∞ ¹
IsVoidElement-8                                                       0.000 ± ∞ ¹
NodeRenderComplex-8                                                   5.000 ± ∞ ¹
MinifyHTML-8                                                          13.00 ± ∞ ¹
ParseActionFromHTTP-8                                                 30.00 ± ∞ ¹
ParseActionFromWebSocket-8                                            13.00 ± ∞ ¹
PrepareUpdate/without-errors-8                                        0.000 ± ∞ ¹
PrepareUpdate/with-errors-8                                           1.000 ± ∞ ¹
SerializeUpdate-8                                                     10.00 ± ∞ ¹
PrepareAndSerialize/simple-update-8                                   11.00 ± ∞ ¹
PrepareAndSerialize/with-metadata-8                                   15.00 ± ∞ ¹
ParseActionScale/small-http-8                                         30.00 ± ∞ ¹
ParseActionScale/small-ws-8                                           13.00 ± ∞ ¹
ParseActionScale/medium-http-8                                        40.00 ± ∞ ¹
ParseActionScale/medium-ws-8                                          23.00 ± ∞ ¹
ParseActionScale/large-http-8                                         63.00 ± ∞ ¹
ParseActionScale/large-ws-8                                           46.00 ± ∞ ¹
SerializeUpdateScale/simple-8                                         10.00 ± ∞ ¹
SerializeUpdateScale/nested-8                                         19.00 ± ∞ ¹
SerializeUpdateScale/multiple-fields-8                                16.00 ± ∞ ¹
DispatchWithState_Cached-4                                                           4.000 ± ∞ ¹
E2EUserJourney-4                                                                    23.68k ± ∞ ¹
E2ETodoApp-4                                                                        1.533k ± ∞ ¹
E2ERangeOperations/add-items-4                                                       844.0 ± ∞ ¹
E2ERangeOperations/remove-items-4                                                    456.0 ± ∞ ¹
E2ERangeOperations/reorder-items-4                                                   588.0 ± ∞ ¹
E2ERangeOperations/update-items-4                                                    588.0 ± ∞ ¹
E2EMultipleSessions/sessions-1-4                                                     236.0 ± ∞ ¹
E2EMultipleSessions/sessions-10-4                                                   2.361k ± ∞ ¹
E2EMultipleSessions/sessions-100-4                                                  23.52k ± ∞ ¹
SpecificationCompliance-4                                                            221.0 ± ∞ ¹
ErrorPaths/invalid-template-syntax-4                                                3.452k ± ∞ ¹
ErrorPaths/missing-field-4                                                           235.0 ± ∞ ¹
ErrorPaths/nil-data-4                                                                220.0 ± ∞ ¹
ErrorPaths/empty-template-4                                                         3.625k ± ∞ ¹
TemplateExecute/initial-render-4                                                    3.812k ± ∞ ¹
TemplateExecute/subsequent-render-4                                                  245.0 ± ∞ ¹
TemplateExecuteUpdates/no-changes-4                                                  229.0 ± ∞ ¹
TemplateExecuteUpdates/small-update-4                                                229.0 ± ∞ ¹
TemplateExecuteUpdates/large-update-4                                                752.0 ± ∞ ¹
TemplateComplexity/simple-fields-4                                                   489.0 ± ∞ ¹
TemplateComplexity/with-conditionals-4                                               388.0 ± ∞ ¹
TemplateComplexity/with-ranges-4                                                     615.0 ± ∞ ¹
TemplateComplexity/deeply-nested-4                                                   558.0 ± ∞ ¹
TemplateConcurrent/goroutines-1-4                                                    245.0 ± ∞ ¹
TemplateConcurrent/goroutines-10-4                                                   245.0 ± ∞ ¹
TemplateConcurrent/goroutines-100-4                                                  245.0 ± ∞ ¹
Template_Execute-4                                                                   248.0 ± ∞ ¹
Template_ExecuteUpdates-4                                                            231.0 ± ∞ ¹
TreeNodeCreation/flat-4                                                              19.00 ± ∞ ¹
TreeNodeCreation/nested-small-4                                                      133.0 ± ∞ ¹
TreeNodeCreation/nested-medium-4                                                     403.0 ± ∞ ¹
TreeNodeCreation/nested-large-4                                                     1.213k ± ∞ ¹
TreeNodeMarshalJSON/flat-4                                                           52.00 ± ∞ ¹
TreeNodeMarshalJSON/nested-small-4                                                   358.0 ± ∞ ¹
TreeNodeMarshalJSON/nested-medium-4                                                 1.087k ± ∞ ¹
WrapperInjection/full-html-4                                                         37.00 ± ∞ ¹
WrapperInjection/fragment-4                                                          28.00 ± ∞ ¹
ExtractWrapperContent-4                                                              28.00 ± ∞ ¹
ContextOperations/with-statics-4                                                     106.0 ± ∞ ¹
ContextOperations/without-statics-4                                                  106.0 ± ∞ ¹
TreeNodeClone/flat-4                                                                 14.00 ± ∞ ¹
TreeNodeClone/nested-small-4                                                         106.0 ± ∞ ¹
TreeNodeClone/nested-medium-4                                                        322.0 ± ∞ ¹
TreeNodeToMap/flat-4                                                                 18.00 ± ∞ ¹
TreeNodeToMap/nested-small-4                                                         120.0 ± ∞ ¹
TreeNodeToMap/nested-medium-4                                                        363.0 ± ∞ ¹
GenerateRandomID-4                                                                   1.000 ± ∞ ¹
CalculateStructureFingerprint_Small-4                                                9.000 ± ∞ ¹
CalculateStructureFingerprint_Medium-4                                               188.0 ± ∞ ¹
CalculateStructureFingerprint_Large-4                                               1.808k ± ∞ ¹
CalculateStructureFingerprint_DeepNested-4                                           154.0 ± ∞ ¹
CalculateStructureFingerprint_Range100-4                                             13.00 ± ∞ ¹
CalculateStructureFingerprint_Range1000-4                                            13.00 ± ∞ ¹
ExecuteTemplateWithContext_Struct-4                                                  29.00 ± ∞ ¹
ExecuteTemplateWithContext_Map-4                                                     36.00 ± ∞ ¹
CompareTreesNoChanges-4                                                              2.000 ± ∞ ¹
CompareTreesSmallChange-4                                                            3.000 ± ∞ ¹
CompareTreesLargeChange/10-4                                                         6.000 ± ∞ ¹
CompareTreesLargeChange/100-4                                                        12.00 ± ∞ ¹
CompareTreesLargeChange/1000-4                                                       23.00 ± ∞ ¹
RangeDiffUpdate-4                                                                    37.00 ± ∞ ¹
RangeDiffInsert-4                                                                    37.00 ± ∞ ¹
RangeDiffRemove-4                                                                    37.00 ± ∞ ¹
PrepareTreeForClient/with-statics-4                                                  0.000 ± ∞ ¹
PrepareTreeForClient/without-statics-4                                               5.000 ± ∞ ¹
ClientNeedsStatics_SameStructure-4                                                   0.000 ± ∞ ¹
ClientNeedsStatics_DifferentStructure-4                                              0.000 ± ∞ ¹
ClientNeedsStatics_DeepNested-4                                                      0.000 ± ∞ ¹
ClientNeedsStatics_Range-4                                                           0.000 ± ∞ ¹
ClientNeedsStatics_NilOld-4                                                          0.000 ± ∞ ¹
WireSize_WithStatics-4                                                               53.00 ± ∞ ¹
WireSize_WithoutStatics-4                                                            55.00 ± ∞ ¹
WireSizeComparison/small_5_with_statics-4                                            18.00 ± ∞ ¹
WireSizeComparison/small_5_without_statics-4                                         18.00 ± ∞ ¹
WireSizeComparison/medium_20_with_statics-4                                          53.00 ± ∞ ¹
WireSizeComparison/medium_20_without_statics-4                                       55.00 ± ∞ ¹
WireSizeComparison/large_100_with_statics-4                                          215.0 ± ∞ ¹
WireSizeComparison/large_100_without_statics-4                                       219.0 ± ∞ ¹
Parse/simple-4                                                                       43.00 ± ∞ ¹
Parse/conditional-4                                                                  64.00 ± ∞ ¹
Parse/range-4                                                                        59.00 ± ∞ ¹
Parse/nested-4                                                                       69.00 ± ∞ ¹
Parse/complex-4                                                                      126.0 ± ∞ ¹
BuildTree/simple-4                                                                   100.0 ± ∞ ¹
BuildTree/conditional-true-4                                                         195.0 ± ∞ ¹
BuildTree/conditional-false-4                                                        102.0 ± ∞ ¹
BuildTree/range-small-4                                                              378.0 ± ∞ ¹
BuildTreeScale/small-10-4                                                           1.197k ± ∞ ¹
BuildTreeScale/medium-100-4                                                         11.73k ± ∞ ¹
BuildTreeScale/large-1000-4                                                         117.1k ± ∞ ¹
NodeRender-4                                                                         3.000 ± ∞ ¹
TreeToHTML/simple-4                                                                  4.000 ± ∞ ¹
TreeToHTML/nested-4                                                                  7.000 ± ∞ ¹
TreeToHTML/with-ranges-4                                                             5.000 ± ∞ ¹
TreeToHTMLScale/small-10-4                                                           16.00 ± ∞ ¹
TreeToHTMLScale/medium-100-4                                                         109.0 ± ∞ ¹
TreeToHTMLScale/large-1000-4                                                        1.017k ± ∞ ¹
IsVoidElement-4                                                                      0.000 ± ∞ ¹
NodeRenderComplex-4                                                                  5.000 ± ∞ ¹
MinifyHTML-4                                                                         13.00 ± ∞ ¹
ParseActionFromHTTP-4                                                                30.00 ± ∞ ¹
ParseActionFromWebSocket-4                                                           13.00 ± ∞ ¹
PrepareUpdate/without-errors-4                                                       0.000 ± ∞ ¹
PrepareUpdate/with-errors-4                                                          1.000 ± ∞ ¹
SerializeUpdate-4                                                                    10.00 ± ∞ ¹
PrepareAndSerialize/simple-update-4                                                  11.00 ± ∞ ¹
PrepareAndSerialize/with-metadata-4                                                  15.00 ± ∞ ¹
ParseActionScale/small-http-4                                                        30.00 ± ∞ ¹
ParseActionScale/small-ws-4                                                          13.00 ± ∞ ¹
ParseActionScale/medium-http-4                                                       40.00 ± ∞ ¹
ParseActionScale/medium-ws-4                                                         23.00 ± ∞ ¹
ParseActionScale/large-http-4                                                        63.00 ± ∞ ¹
ParseActionScale/large-ws-4                                                          46.00 ± ∞ ¹
SerializeUpdateScale/simple-4                                                        10.00 ± ∞ ¹
SerializeUpdateScale/nested-4                                                        19.00 ± ∞ ¹
SerializeUpdateScale/multiple-fields-4                                               16.00 ± ∞ ¹
ConcurrentConnections/100_connections-4                                              200.0 ± ∞ ¹
ConcurrentConnections/:00_connections-4                                             2.000k ± ∞ ¹
RegisterUnregister-4                                                                 13.00 ± ∞ ¹
GetByGroup-4                                                                         1.000 ± ∞ ¹
CloseConnection-4                                                                    3.000 ± ∞ ¹
MemoryUsage-4                                                                        619.0 ± ∞ ¹
BroadcastToGroup-4                                                                   101.0 ± ∞ ¹
ConcurrentRegistrations-4                                                            11.00 ± ∞ ¹
GetByGroupExcept-4                                                                   1.000 ± ∞ ¹
geomean                                                                         ²                 ? ³ ² ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² summaries must be >0 to compute geomean
³ benchmark set differs from baseline; geomeans may not be comparable
⁴ ratios must be >0 to compute geomean

                                               │ current-bench.txt │
                                               │     bytes/op      │
WireSize_WithStatics-4                                 294.0 ± ∞ ¹
WireSize_WithoutStatics-4                              251.0 ± ∞ ¹
WireSizeComparison/small_5_with_statics-4              104.0 ± ∞ ¹
WireSizeComparison/small_5_without_statics-4           61.00 ± ∞ ¹
WireSizeComparison/medium_20_with_statics-4            294.0 ± ∞ ¹
WireSizeComparison/medium_20_without_statics-4         251.0 ± ∞ ¹
WireSizeComparison/large_100_with_statics-4          1.203Ki ± ∞ ¹
WireSizeComparison/large_100_without_statics-4       1.203Ki ± ∞ ¹
geomean                                                291.7
¹ need >= 6 samples for confidence interval at level 0.95

Thresholds

  • ⚠️ Warning: Regressions >10% on critical benchmarks
  • ❌ Failure: Regressions >20% on critical benchmarks
  • Critical benchmarks: Benchmark(E2E|Template|CompareTrees|RangeDiff|PrepareTree).*

See benchmarking guide for details.

@adnaan adnaan merged commit 50a3d2f into main Feb 22, 2026
11 checks passed
adnaan added a commit to livetemplate/examples that referenced this pull request Feb 22, 2026
…refs

Remove the trace-correlation example directory (relied on deleted
internal/observe Trace* types) and update observability/README.md
to use slog directly instead of observe.NewLogger().

Companion to livetemplate/livetemplate#123.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
adnaan added a commit to livetemplate/examples that referenced this pull request Feb 22, 2026
…refs (#29)

Remove the trace-correlation example directory (relied on deleted
internal/observe Trace* types) and update observability/README.md
to use slog directly instead of observe.NewLogger().

Companion to livetemplate/livetemplate#123.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

FOLLOW-UP: Migrate all log.Printf() to slog for logging consistency (from PR #97)

2 participants