graph/db: add ChanUpdatesInHorizon benchmark
What changed, and why it matters
This commit only adds a new benchmark test that measures how fast a database method called ChanUpdatesInHorizon runs. It does not change any production code, fix a bug, or alter behavior. There is no security relevance.
No action required. This is a benign test-only addition.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds a single benchmark subtest to graph/db/benchmark_test.go under BenchmarkGraphReadMethods. The new test invokes store.ChanUpdatesInHorizon(time.Unix(0, 0), time.Now()) and asserts no error. It is purely test/performance code; no implementation logic is modified.
Changed components
graph/db/benchmark_test.goInspect captured patch +9 / −0
diff --git a/graph/db/benchmark_test.go b/graph/db/benchmark_test.go
index 08dba16..1022197 100644
--- a/graph/db/benchmark_test.go
+++ b/graph/db/benchmark_test.go
@@ -736,6 +736,15 @@ func BenchmarkGraphReadMethods(b *testing.B) {
require.NoError(b, err)
},
},
+ {
+ name: "ChanUpdatesInHorizon",
+ fn: func(b testing.TB, store V1Store) {
+ _, err := store.ChanUpdatesInHorizon(
+ time.Unix(0, 0), time.Now(),
+ )
+ require.NoError(b, err)
+ },
+ },
}
for _, test := range tests {
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.