Skip to content

Commit

Permalink
remove _azle_memory_usage
Browse files Browse the repository at this point in the history
  • Loading branch information
lastmjs committed Dec 12, 2024
1 parent e96a7ed commit 2f8085f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 23 deletions.
Binary file modified canister_templates/experimental.wasm
Binary file not shown.
Binary file modified canister_templates/stable.wasm
Binary file not shown.
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"crypto-browserify": "^3.12.0",
"cuzz": "github:demergent-labs/cuzz#5d5cbd7b161f8c16cfa26204e7262aae87b35cd9",
"cuzz": "github:demergent-labs/cuzz#2040f87d31baae69ce5ae0fce40c513ba200e630",
"deep-is": "^0.1.4",
"esbuild": "^0.23.0",
"esbuild-plugin-tsc": "^0.4.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// TODO the plan is to integrate rquickjs for stable
// TODO and at that time create two crates
// TODO we should place each crate at src/build/stable/commands/compile/rust
// TODO and src/build/experimental/commands/compile/rust respectively

use std::{cell::RefCell, convert::TryInto};
use std::cell::RefCell;

#[allow(unused)]
use guards::guard_against_non_controllers;
Expand Down Expand Up @@ -95,8 +90,3 @@ pub fn _azle_get_benchmarks() -> Vec<benchmarking::BenchmarkEntry> {
benchmarking::BENCHMARKS_REF_CELL
.with(|benchmarks_ref_cell| benchmarks_ref_cell.borrow().clone())
}

#[ic_cdk_macros::query]
pub fn _azle_memory_usage() -> u64 {
TryInto::<u64>::try_into(core::arch::wasm32::memory_size(0)).unwrap() * 65_536u64
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{cell::RefCell, convert::TryInto};
use std::cell::RefCell;

use benchmarking::{BenchmarkEntry, BENCHMARKS_REF_CELL};
use guards::guard_against_non_controllers;
Expand Down Expand Up @@ -38,8 +38,3 @@ pub fn _azle_chunk() {}
pub fn _azle_get_benchmarks() -> Vec<BenchmarkEntry> {
BENCHMARKS_REF_CELL.with(|benchmarks_ref_cell| benchmarks_ref_cell.borrow().clone())
}

#[ic_cdk_macros::query]
pub fn _azle_memory_usage() -> u64 {
TryInto::<u64>::try_into(core::arch::wasm32::memory_size(0)).unwrap() * 65_536u64
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ export default class {

if (
methodName() === 'accessible' ||
methodName() === '_azle_get_benchmarks' ||
methodName() === '_azle_memory_usage'
methodName() === '_azle_get_benchmarks'
) {
acceptMessage();
return;
Expand Down

0 comments on commit 2f8085f

Please sign in to comment.