diff --git a/lib_libwasmvm.go b/lib_libwasmvm.go index e4b28bd4a..e9c160926 100644 --- a/lib_libwasmvm.go +++ b/lib_libwasmvm.go @@ -111,6 +111,12 @@ func (vm *VM) GetMetrics() (*types.Metrics, error) { return api.GetMetrics(vm.cache) } +// GetPinnedMetrics returns some internal metrics of pinned contracts for monitoring purposes. +// The order of entries is non-deterministic and the values are node-specific. Don't use this in consensus-critical contexts. +func (vm *VM) GetPinnedMetrics() (*types.PinnedMetrics, error) { + return api.GetPinnedMetrics(vm.cache) +} + // Instantiate will create a new contract based on the given Checksum. // We can set the initMsg (contract "genesis") here, and it then receives // an account and address and can be invoked (Execute) many times.