MCPcopy Create free account
hub / github.com/evilsocket/sum / BenchmarkServiceCreateOracle

Function BenchmarkServiceCreateOracle

service/oracles_benchmark_test.go:10–25  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

8)
9
10func BenchmarkServiceCreateOracle(b *testing.B) {
11 setupFolders(b)
12 defer teardown(b)
13
14 svc, err := New(testFolder, "", "")
15 if err != nil {
16 b.Fatal(err)
17 }
18
19 ctx := context.TODO()
20 for i := 0; i < b.N; i++ {
21 if _, err := svc.CreateOracle(ctx, &testOracle); err != nil {
22 b.Fatal(err)
23 }
24 }
25}
26
27func BenchmarkServiceUpdateOracle(b *testing.B) {
28 setup(b, true, true)

Callers

nothing calls this directly

Calls 4

setupFoldersFunction · 0.85
teardownFunction · 0.85
NewFunction · 0.85
CreateOracleMethod · 0.65

Tested by

no test coverage detected