Skip to content

Commit

Permalink
Merge pull request #544 from CosmWasm/co/expose-pinned-metrics
Browse files Browse the repository at this point in the history
Expose pinned metrics through vm
  • Loading branch information
chipshort authored Jul 3, 2024
2 parents f3fe7e7 + 0dc2068 commit 4359354
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib_libwasmvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4359354

Please sign in to comment.