Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metering features #890

Closed
mikhailOK opened this issue Oct 18, 2019 · 2 comments
Closed

Metering features #890

mikhailOK opened this issue Oct 18, 2019 · 2 comments
Assignees
Labels
🎉 enhancement New feature! 📦 lib-compiler-singlepass About wasmer-compiler-singlepass ⏱ metering

Comments

@mikhailOK
Copy link

It would be nice to have the following features for metering:

  1. Getting the points used when Module::instantiate fails in start_func(): in this case there is no Instance returned
  2. Having a way to increment points_used in host functions called by the wasm code through ImportObject: currently it's possible to point at Instance from the state of ImportObject, but no way to do it for initializer before Instance is created
@mikhailOK mikhailOK added the 🎉 enhancement New feature! label Oct 18, 2019
@syrusakbary syrusakbary added ⏱ metering 📦 lib-compiler-singlepass About wasmer-compiler-singlepass labels Oct 23, 2019
losfair pushed a commit that referenced this issue Nov 10, 2019
808: Bump rand from 0.7.0 to 0.7.2 r=MarkMcCaskey a=dependabot-preview[bot]

Bumps [rand](https://github.com/rust-random/rand) from 0.7.0 to 0.7.2.
<details>
<summary>Changelog</summary>

*Sourced from [rand's changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md).*

> ## [0.7.2] - 2019-09-16
> ### Fixes
> - Fix dependency on `rand_core` 0.5.1 ([#890](https://github-redirect.dependabot.com/rust-random/rand/issues/890))
> 
> ### Additions
> - Unit tests for value stability of distributions added ([#888](https://github-redirect.dependabot.com/rust-random/rand/issues/888))
> 
> ## [0.7.1] - 2019-09-13
> ### Fixes
> - Fix `no_std` behaviour, appropriately enable c2-chacha's `std` feature ([#844](https://github-redirect.dependabot.com/rust-random/rand/issues/844))
> - `alloc` feature in `no_std` is available since Rust 1.36 ([#856](https://github-redirect.dependabot.com/rust-random/rand/issues/856))
> - Fix or squelch issues from Clippy lints ([#840](https://github-redirect.dependabot.com/rust-random/rand/issues/840))
> 
> ### Additions
> - Add a `no_std` target to CI to continously evaluate `no_std` status ([#844](https://github-redirect.dependabot.com/rust-random/rand/issues/844))
> - `WeightedIndex`: allow adjusting a sub-set of weights ([#866](https://github-redirect.dependabot.com/rust-random/rand/issues/866))
</details>
<details>
<summary>Commits</summary>

- [`249ebfc`](rust-random/rand@249ebfc) Merge pull request [#888](https://github-redirect.dependabot.com/rust-random/rand/issues/888) from dhardy/master
- [`5ac4cbd`](rust-random/rand@5ac4cbd) Prepare rand 0.7.2
- [`f39915a`](rust-random/rand@f39915a) rand_distr: work around tan func issue
- [`802ba8f`](rust-random/rand@802ba8f) rand_distr: add missing value_stability tests
- [`a43d7f1`](rust-random/rand@a43d7f1) Fix tests
- [`2ef2e66`](rust-random/rand@2ef2e66) Add value_stability tests for uniform
- [`096a5dd`](rust-random/rand@096a5dd) UniformSampler: add doc on usage of sample_single
- [`f78781a`](rust-random/rand@f78781a) Uniform: replace inner field with struct tuple
- [`856fdfb`](rust-random/rand@856fdfb) Distribution: add doc of portability
- [`72af6f8`](rust-random/rand@72af6f8) Add value_stability tests for bernoulli, int, float and other distrs
- Additional commits viewable in [compare view](rust-random/rand@0.7.0...0.7.2)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=rand&package-manager=cargo&previous-version=0.7.0&new-version=0.7.2)](https://dependabot.com/compatibility-score.html?dependency-name=rand&package-manager=cargo&previous-version=0.7.0&new-version=0.7.2)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
@stale
Copy link

stale bot commented Jul 14, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the 🏚 stale Inactive issues or PR label Jul 14, 2021
@Hywan Hywan self-assigned this Jul 15, 2021
@Hywan
Copy link
Contributor

Hywan commented Jul 15, 2021

Closing this issue since we have the wasmer-middlewares crate that provides the Metering middleware. See it in action in https://github.com/wasmerio/wasmer/blob/c7f4bd28109ee1eaa18c5979c5abe6ada5beb67c/examples/metering.rs.

@Hywan Hywan closed this as completed Jul 15, 2021
@stale stale bot removed the 🏚 stale Inactive issues or PR label Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature! 📦 lib-compiler-singlepass About wasmer-compiler-singlepass ⏱ metering
Projects
None yet
Development

No branches or pull requests

3 participants