MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / TestDBMetrics

Function TestDBMetrics

driver/ipfs-synckv/db_test.go:73–87  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

71}
72
73func TestDBMetrics(t *testing.T) {
74 tmpDir, err := os.MkdirTemp("", "ipfs-synckv-test")
75 require.NoError(t, err)
76 defer os.RemoveAll(tmpDir)
77
78 cfg := config.NewConfigDefault()
79 store := Store{}
80 db, err := store.Open(tmpDir, cfg)
81 require.NoError(t, err)
82 defer db.Close()
83
84 title, metrics := db.(*DB).Metrics()
85 require.Equal(t, "hybriddb cache", title)
86 require.NotEmpty(t, metrics)
87}

Callers

nothing calls this directly

Calls 4

OpenMethod · 0.95
CloseMethod · 0.65
EqualMethod · 0.65
MetricsMethod · 0.45

Tested by

no test coverage detected