MCPcopy Create free account
hub / github.com/astercloud/aster / BenchmarkBackendWrite

Function BenchmarkBackendWrite

pkg/middleware/integration_test.go:251–258  ·  view source on GitHub ↗

BenchmarkBackendWrite 性能测试: Backend Write

(b *testing.B)

Source from the content-addressed store, hash-verified

249
250// BenchmarkBackendWrite 性能测试: Backend Write
251func BenchmarkBackendWrite(b *testing.B) {
252 backend := backends.NewStateBackend()
253 ctx := context.Background()
254
255 for b.Loop() {
256 _, _ = backend.Write(ctx, "/bench.txt", "test content")
257 }
258}

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.95
NewStateBackendFunction · 0.92

Tested by

no test coverage detected