mirror of
https://github.com/hanzoai/status.git
synced 2026-10-30 18:21:48 +00:00
The import path a reader types is the one the org owns, rather than the forge that happens to host the bytes. hanzo.ai serves the go-import meta and points it at the same repository, so where the code lives does not change. Rewritten by role. A bare repository URL — a clone target, a badge, a build context — still names where the code is and stays on github.com.
22 lines
577 B
Go
22 lines
577 B
Go
package memory
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"hanzo.ai/status/config/endpoint"
|
|
"hanzo.ai/status/storage"
|
|
"hanzo.ai/status/storage/store/common/paging"
|
|
)
|
|
|
|
func BenchmarkShallowCopyEndpointStatus(b *testing.B) {
|
|
ep := &testEndpoint
|
|
status := endpoint.NewStatus(ep.Group, ep.Name)
|
|
for range storage.DefaultMaximumNumberOfResults {
|
|
AddResult(status, &testSuccessfulResult, storage.DefaultMaximumNumberOfResults, storage.DefaultMaximumNumberOfEvents)
|
|
}
|
|
for b.Loop() {
|
|
ShallowCopyEndpointStatus(status, paging.NewEndpointStatusParams().WithResults(1, 20))
|
|
}
|
|
b.ReportAllocs()
|
|
}
|