Compare commits

..

12 Commits

Author SHA1 Message Date
Omar Abdulla aa8b057cb3 Cleanup watcher from temp code 2025-10-22 17:03:13 +03:00
Omar Abdulla d6b927ce49 compute metrics in each report 2025-10-22 17:00:15 +03:00
Omar Abdulla 03b09d49ec Add the block information to the report 2025-10-22 15:36:42 +03:00
Omar Abdulla 3c10f5d2f3 Include the contract information in the report 2025-10-22 15:12:46 +03:00
Omar Abdulla a5853f86b7 Add step information to the benchmark report 2025-10-22 14:48:16 +03:00
Omar Abdulla d4019f39a4 Remove corpus from the report 2025-10-22 13:44:31 +03:00
Omar Abdulla b2c9e77187 Merge branch 'main' into feature/benchmarking-infra-2 2025-10-22 13:37:08 +03:00
Omar Abdulla ecf86f873f Add more models to the report 2025-10-20 12:25:30 +03:00
Omar Abdulla 18a27233cd make report more benchmarks friendly 2025-10-20 10:31:49 +03:00
Omar Abdulla ce38a300f4 Make report format more benchmark friendly 2025-10-20 10:19:00 +03:00
Omar Abdulla 325cb3f6e9 Report the step path to the watcher 2025-10-20 09:38:51 +03:00
Omar Abdulla 3d5feea4a4 Modify the structure of the MinedBlockInformation 2025-10-20 09:24:33 +03:00
8 changed files with 15 additions and 41 deletions
Generated
-11
View File
@@ -1920,7 +1920,6 @@ dependencies = [
"anstyle",
"clap_lex",
"strsim",
"terminal_size",
]
[[package]]
@@ -7839,16 +7838,6 @@ dependencies = [
"winapi-util",
]
[[package]]
name = "terminal_size"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed"
dependencies = [
"rustix",
"windows-sys 0.59.0",
]
[[package]]
name = "thiserror"
version = "1.0.69"
+1 -1
View File
@@ -26,7 +26,7 @@ ansi_term = "0.12.1"
anyhow = "1.0"
bson = { version = "2.15.0" }
cacache = { version = "13.1.0" }
clap = { version = "4", features = ["derive", "wrap_help"] }
clap = { version = "4", features = ["derive"] }
dashmap = { version = "6.1.0" }
foundry-compilers-artifacts = { version = "0.18.0" }
futures = { version = "0.3.31" }
+4 -4
View File
@@ -24,7 +24,7 @@ use strum::{AsRefStr, Display, EnumString, IntoStaticStr};
use temp_dir::TempDir;
#[derive(Clone, Debug, Parser, Serialize, Deserialize)]
#[command(name = "retester", term_width = 100)]
#[command(name = "retester")]
pub enum Context {
/// Executes tests in the MatterLabs format differentially on multiple targets concurrently.
Test(Box<TestExecutionContext>),
@@ -510,7 +510,7 @@ pub struct ExportGenesisContext {
impl Default for TestExecutionContext {
fn default() -> Self {
Self::parse_from(["execution-context", "--test", "."])
Self::parse_from(["execution-context"])
}
}
@@ -612,7 +612,7 @@ impl AsRef<IgnoreSuccessConfiguration> for TestExecutionContext {
impl Default for BenchmarkingContext {
fn default() -> Self {
Self::parse_from(["benchmarking-context", "--test", "."])
Self::parse_from(["benchmarking-context"])
}
}
@@ -759,7 +759,7 @@ pub struct CorpusConfiguration {
/// - `{metadata_file_path}::{case_idx}::{mode}`: This is very similar to the above specifier
/// with the exception that in this case the mode is specified and will be used in the test.
#[serde_as(as = "Vec<serde_with::DisplayFromStr>")]
#[arg(short = 't', long = "test", required = true)]
#[arg(short = 't', long = "test")]
pub test_specifiers: Vec<ParsedTestSpecifier>,
}
+1 -3
View File
@@ -597,17 +597,15 @@ where
let expected = !assertion.exception;
let actual = receipt.status();
if actual != expected {
let revert_reason = tracing_result.revert_reason.as_ref();
tracing::error!(
expected,
actual,
?receipt,
?tracing_result,
?revert_reason,
"Transaction status assertion failed"
);
anyhow::bail!(
"Transaction status assertion failed - Expected {expected} but got {actual}. Revert reason: {revert_reason:?}",
"Transaction status assertion failed - Expected {expected} but got {actual}",
);
}
@@ -330,18 +330,15 @@ async fn start_cli_reporting_task(output_format: OutputFormat, reporter: Reporte
.unwrap();
writeln!(buf).unwrap();
if aggregator_events_rx.is_empty() {
buf = tokio::task::spawn_blocking(move || {
buf.flush().unwrap();
buf
})
.await
.unwrap();
}
buf = tokio::task::spawn_blocking(move || {
buf.flush().unwrap();
buf
})
.await
.unwrap();
}
}
}
info!("Aggregator Broadcast Channel Closed");
// Summary at the end.
match output_format {
+1 -1
View File
@@ -104,7 +104,7 @@ where
};
debug!(%tx_hash, "Submitted Transaction");
pending_transaction.set_timeout(Some(Duration::from_secs(240)));
pending_transaction.set_timeout(Some(Duration::from_secs(120)));
let tx_hash = pending_transaction.watch().await.context(format!(
"Transaction inclusion watching timeout for {tx_hash}"
))?;
+2 -2
View File
@@ -41,7 +41,7 @@ pub struct ReportAggregator {
impl ReportAggregator {
pub fn new(context: Context) -> Self {
let (runner_tx, runner_rx) = unbounded_channel::<RunnerEvent>();
let (listener_tx, _) = channel::<ReporterEvent>(0xFFFF);
let (listener_tx, _) = channel::<ReporterEvent>(1024);
Self {
report: Report::new(context),
remaining_cases: Default::default(),
@@ -64,7 +64,7 @@ impl ReportAggregator {
debug!("Starting to aggregate report");
while let Some(event) = self.runner_rx.recv().await {
debug!(event = event.variant_name(), "Received Event");
debug!(?event, "Received Event");
match event {
RunnerEvent::SubscribeToEvents(event) => {
self.handle_subscribe_to_events_event(*event);
-10
View File
@@ -347,16 +347,6 @@ macro_rules! define_event {
),*
}
impl $ident {
pub fn variant_name(&self) -> &'static str {
match self {
$(
Self::$variant_ident { .. } => stringify!($variant_ident)
),*
}
}
}
$(
#[derive(Debug)]
$(#[$variant_meta])*