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

release: v1.5.8 #129

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
584 changes: 399 additions & 185 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion compiler_tester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ solidity-adapter = { path = "../solidity_adapter" }
benchmark-analyzer = { path = "../benchmark_analyzer" }

[dependencies.web3]
version = "=0.19.0"
git = "https://github.com/jacques-kigo/rust-web3"
branch = "master"
default-features = false
features = ["http-rustls-tls", "test", "signing"]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
//!
//! Output format for benchmark data.
//!

///
/// Output format for benchmark data.
#[derive(Clone, Debug, Default, Eq, PartialEq)]
///
#[derive(Debug, Default, Clone, PartialEq, Eq)]
pub enum BenchmarkFormat {
#[default]
/// JSON format.
Json,
/// CSV format.
Csv,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

use std::path::PathBuf;

use benchmark_format::BenchmarkFormat;
use clap::Parser;

pub mod benchmark_format;

///
/// The compiler tester arguments.
///
Expand Down Expand Up @@ -44,8 +41,8 @@ pub struct Arguments {
pub benchmark: Option<PathBuf>,

/// The benchmark output format.
#[structopt(long = "benchmark-format", default_value_t = BenchmarkFormat::Json)]
pub benchmark_format: BenchmarkFormat,
#[structopt(long = "benchmark-format", default_value_t = compiler_tester::BenchmarkFormat::Json)]
pub benchmark_format: compiler_tester::BenchmarkFormat,

/// Sets the number of threads, which execute the tests concurrently.
#[structopt(short, long)]
Expand Down
9 changes: 4 additions & 5 deletions compiler_tester/src/compiler_tester/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use std::path::PathBuf;
use std::str::FromStr;
use std::time::Instant;

use arguments::benchmark_format::BenchmarkFormat;
use clap::Parser;
use colored::Colorize;

Expand Down Expand Up @@ -224,10 +223,10 @@ fn main_inner(arguments: Arguments) -> anyhow::Result<()> {
if let Some(path) = arguments.benchmark {
let benchmark = summary.benchmark(toolchain)?;
match arguments.benchmark_format {
BenchmarkFormat::Json => {
compiler_tester::BenchmarkFormat::Json => {
benchmark.write_to_file(path, benchmark_analyzer::JsonSerializer)?
}
BenchmarkFormat::Csv => {
compiler_tester::BenchmarkFormat::Csv => {
benchmark.write_to_file(path, benchmark_analyzer::CsvSerializer)?
}
}
Expand All @@ -244,7 +243,7 @@ fn main_inner(arguments: Arguments) -> anyhow::Result<()> {
mod tests {
use std::path::PathBuf;

use crate::arguments::{benchmark_format::BenchmarkFormat, Arguments};
use crate::arguments::Arguments;

#[test]
fn test_manually() {
Expand All @@ -258,7 +257,7 @@ mod tests {
path: vec!["tests/solidity/simple/default.sol".to_owned()],
group: vec![],
benchmark: None,
benchmark_format: BenchmarkFormat::Json,
benchmark_format: compiler_tester::BenchmarkFormat::Json,
threads: Some(1),
dump_system: false,
disable_deployer: false,
Expand Down
5 changes: 3 additions & 2 deletions compiler_tester/src/compilers/vyper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@ impl VyperCompiler {
&mode.vyper_version,
paths,
&[
era_compiler_vyper::VyperSelection::IRJson,
era_compiler_vyper::VyperSelection::EraVMAssembly,
era_compiler_vyper::VyperSelector::IRJson,
era_compiler_vyper::VyperSelector::EraVMAssembly,
],
evm_version,
true,
None,
mode.vyper_optimize,
)
}
Expand Down
2 changes: 2 additions & 0 deletions compiler_tester/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]

pub(crate) mod benchmark_format;
pub(crate) mod compilers;
pub(crate) mod directories;
pub(crate) mod environment;
Expand All @@ -26,6 +27,7 @@ use itertools::Itertools;
use rayon::iter::IntoParallelIterator;
use rayon::iter::ParallelIterator;

pub use crate::benchmark_format::BenchmarkFormat;
pub use crate::compilers::eravm::EraVMCompiler;
pub use crate::compilers::llvm::LLVMCompiler;
pub use crate::compilers::mode::llvm_options::LLVMOptions;
Expand Down
3 changes: 2 additions & 1 deletion solidity_adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ md5 = "=0.7.0"
era-compiler-common = { git = "https://github.com/matter-labs/era-compiler-common", branch = "main" }

[dependencies.web3]
version = "=0.19.0"
git = "https://github.com/jacques-kigo/rust-web3"
branch = "master"
default-features = false
features = ["http-rustls-tls", "test", "signing"]
Loading