mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-12 17:01:06 +00:00
Add more models to the report
This commit is contained in:
@@ -5,16 +5,16 @@ use std::{
|
|||||||
collections::{BTreeMap, BTreeSet, HashMap, HashSet},
|
collections::{BTreeMap, BTreeSet, HashMap, HashSet},
|
||||||
fs::OpenOptions,
|
fs::OpenOptions,
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
time::{SystemTime, UNIX_EPOCH},
|
time::{Instant, SystemTime, UNIX_EPOCH},
|
||||||
};
|
};
|
||||||
|
|
||||||
use alloy::primitives::Address;
|
use alloy::primitives::{Address, BlockNumber, BlockTimestamp, TxHash};
|
||||||
use anyhow::{Context as _, Result};
|
use anyhow::{Context as _, Result};
|
||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use revive_dt_common::types::{ParsedTestSpecifier, PlatformIdentifier};
|
use revive_dt_common::types::{ParsedTestSpecifier, PlatformIdentifier};
|
||||||
use revive_dt_compiler::{CompilerInput, CompilerOutput, Mode};
|
use revive_dt_compiler::{CompilerInput, CompilerOutput, Mode};
|
||||||
use revive_dt_config::Context;
|
use revive_dt_config::Context;
|
||||||
use revive_dt_format::{case::CaseIdx, metadata::ContractInstance};
|
use revive_dt_format::{case::CaseIdx, metadata::ContractInstance, steps::StepPath};
|
||||||
use semver::Version;
|
use semver::Version;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_with::{DisplayFromStr, serde_as};
|
use serde_with::{DisplayFromStr, serde_as};
|
||||||
@@ -477,6 +477,7 @@ pub struct ExecutionReport {
|
|||||||
pub metrics: Option<Metrics>,
|
pub metrics: Option<Metrics>,
|
||||||
/// Information related to the execution on one of the platforms.
|
/// Information related to the execution on one of the platforms.
|
||||||
pub platform_execution: PlatformKeyedInformation<Option<ExecutionInformation>>,
|
pub platform_execution: PlatformKeyedInformation<Option<ExecutionInformation>>,
|
||||||
|
pub steps: BTreeMap<StepPath, StepReport>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Information related to the status of the test. Could be that the test succeeded, failed, or that
|
/// Information related to the status of the test. Could be that the test succeeded, failed, or that
|
||||||
@@ -575,6 +576,23 @@ pub enum CompilationStatus {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Information on each step in the execution.
|
||||||
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
|
pub struct StepReport {
|
||||||
|
/// Information on the transactions submitted as part of this step.
|
||||||
|
transactions: PlatformKeyedInformation<Vec<TransactionInformation>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
|
pub struct TransactionInformation {
|
||||||
|
/// The hash of the transaction
|
||||||
|
pub transaction_hash: TxHash,
|
||||||
|
pub submission_timestamp: u64,
|
||||||
|
pub block_timestamp: u64,
|
||||||
|
pub block_number: BlockNumber,
|
||||||
|
pub gas_used: u64,
|
||||||
|
}
|
||||||
|
|
||||||
/// The metrics we collect for our benchmarks.
|
/// The metrics we collect for our benchmarks.
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub struct Metrics {
|
pub struct Metrics {
|
||||||
|
|||||||
Reference in New Issue
Block a user