Skip to content

Commit

Permalink
test: Implement MemoryUsage on test middlewares.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Mar 22, 2021
1 parent 2afed4d commit c212f74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ criterion = "0.3"
lazy_static = "1.4"
wasmer-engine-dummy = { path = "tests/lib/engine-dummy" }
tempfile = "3.1"
loupe = { git = "https://github.com/wasmerio/loupe", branch = "master" }

[features]
# Don't add the compiler features in default, please add them on the Makefile
Expand Down
5 changes: 3 additions & 2 deletions tests/compilers/middlewares.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use crate::utils::get_store_with_middlewares;
use anyhow::Result;

use loupe::MemoryUsage;
use std::sync::Arc;
use wasmer::wasmparser::Operator;
use wasmer::*;

#[derive(Debug)]
#[derive(Debug, MemoryUsage)]
struct Add2MulGen {
value_off: i32,
}
Expand Down Expand Up @@ -47,7 +48,7 @@ impl FunctionMiddleware for Add2Mul {
}
}

#[derive(Debug)]
#[derive(Debug, MemoryUsage)]
struct FusionGen;

#[derive(Debug)]
Expand Down

0 comments on commit c212f74

Please sign in to comment.