Skip to content

Commit 4359354

Browse files
authored
Merge pull request #544 from CosmWasm/co/expose-pinned-metrics
Expose pinned metrics through vm
2 parents f3fe7e7 + 0dc2068 commit 4359354

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib_libwasmvm.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ func (vm *VM) GetMetrics() (*types.Metrics, error) {
111111
return api.GetMetrics(vm.cache)
112112
}
113113

114+
// GetPinnedMetrics returns some internal metrics of pinned contracts for monitoring purposes.
115+
// The order of entries is non-deterministic and the values are node-specific. Don't use this in consensus-critical contexts.
116+
func (vm *VM) GetPinnedMetrics() (*types.PinnedMetrics, error) {
117+
return api.GetPinnedMetrics(vm.cache)
118+
}
119+
114120
// Instantiate will create a new contract based on the given Checksum.
115121
// We can set the initMsg (contract "genesis") here, and it then receives
116122
// an account and address and can be invoked (Execute) many times.

0 commit comments

Comments
 (0)