Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zjma committed Feb 6, 2025
1 parent 3262d1f commit 75998e2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
use crate::{
gas_feature_versions::{RELEASE_V1_14, RELEASE_V1_8, RELEASE_V1_9_SKIPPED},
gas_schedule::NativeGasParameters,
ver::gas_feature_versions::{RELEASE_V1_12, RELEASE_V1_13, RELEASE_V1_23, RELEASE_V1_26, RELEASE_V1_27},
ver::gas_feature_versions::{
RELEASE_V1_12, RELEASE_V1_13, RELEASE_V1_23, RELEASE_V1_26, RELEASE_V1_27,
},
};
use aptos_gas_algebra::{
InternalGas, InternalGasPerAbstractValueUnit, InternalGasPerArg, InternalGasPerByte,
Expand Down
8 changes: 5 additions & 3 deletions aptos-move/framework/tests/move_unit_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ fn run_tests_for_pkg(path_to_pkg: impl Into<String>) {
..Default::default()
};

let mut utc = UnitTestingConfig::default();
utc.filter = std::env::var("TEST_FILTER").ok();
utc.report_statistics = matches!(std::env::var("REPORT_STATS"), Ok(s) if s.as_str() == "1");
let utc = UnitTestingConfig {
filter: std::env::var("TEST_FILTER").ok(),
report_statistics: matches!(std::env::var("REPORT_STATS"), Ok(s) if s.as_str() == "1"),
..Default::default()
};
let ok = run_move_unit_tests(
&pkg_path,
build_config.clone(),
Expand Down
22 changes: 18 additions & 4 deletions crates/aptos-crypto/benches/bulletproofs_batch_verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,20 @@ fn bench_group(c: &mut Criterion) {
group.finish();
}

fn range_batch_prove<M: Measurement>(g: &mut BenchmarkGroup<M>, num_bits: usize, batch_size: usize) {
fn range_batch_prove<M: Measurement>(
g: &mut BenchmarkGroup<M>,
num_bits: usize,
batch_size: usize,
) {
let pg = PedersenGens::default();
let bg = BulletproofGens::new(MAX_RANGE_BITS, 16);

g.throughput(Throughput::Elements(batch_size as u64));
g.bench_function(
BenchmarkId::new("range_prove", format!("batch={}/bits={}", batch_size, num_bits)),
BenchmarkId::new(
"range_prove",
format!("batch={}/bits={}", batch_size, num_bits),
),
move |b| {
b.iter_with_setup(
|| get_values(num_bits, batch_size),
Expand All @@ -72,13 +79,20 @@ fn range_batch_prove<M: Measurement>(g: &mut BenchmarkGroup<M>, num_bits: usize,
);
}

fn range_batch_verify<M: Measurement>(g: &mut BenchmarkGroup<M>, num_bits: usize, batch_size: usize) {
fn range_batch_verify<M: Measurement>(
g: &mut BenchmarkGroup<M>,
num_bits: usize,
batch_size: usize,
) {
let bp_gens = BulletproofGens::new(MAX_RANGE_BITS, 16);
let pc_gens = PedersenGens::default();

g.throughput(Throughput::Elements(batch_size as u64));
g.bench_function(
BenchmarkId::new("range_verify", format!("batch={}/bits={}", batch_size, num_bits)),
BenchmarkId::new(
"range_verify",
format!("batch={}/bits={}", batch_size, num_bits),
),
move |b| {
b.iter_with_setup(
|| {
Expand Down

0 comments on commit 75998e2

Please sign in to comment.