mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-01-04 06:13:09 +00:00
Improve workload and expectation logging
This commit is contained in:
parent
75541abaa2
commit
74fddd51dd
@ -39,6 +39,7 @@ impl Expectation for ConsensusLiveness {
|
|||||||
async fn evaluate(&mut self, ctx: &RunContext) -> Result<(), DynError> {
|
async fn evaluate(&mut self, ctx: &RunContext) -> Result<(), DynError> {
|
||||||
Self::ensure_participants(ctx)?;
|
Self::ensure_participants(ctx)?;
|
||||||
let target_hint = Self::target_blocks(ctx);
|
let target_hint = Self::target_blocks(ctx);
|
||||||
|
tracing::info!(target_hint, "consensus liveness: collecting samples");
|
||||||
let check = Self::collect_results(ctx).await;
|
let check = Self::collect_results(ctx).await;
|
||||||
(*self).report(target_hint, check)
|
(*self).report(target_hint, check)
|
||||||
}
|
}
|
||||||
@ -105,14 +106,13 @@ impl ConsensusLiveness {
|
|||||||
for attempt in 0..REQUEST_RETRIES {
|
for attempt in 0..REQUEST_RETRIES {
|
||||||
match Self::fetch_cluster_info(client).await {
|
match Self::fetch_cluster_info(client).await {
|
||||||
Ok((height, tip)) => {
|
Ok((height, tip)) => {
|
||||||
samples.push(NodeSample {
|
let label = format!("node-{idx}");
|
||||||
label: format!("node-{idx}"),
|
tracing::debug!(node = %label, height, tip = ?tip, attempt, "consensus_info collected");
|
||||||
height,
|
samples.push(NodeSample { label, height, tip });
|
||||||
tip,
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Err(err) if attempt + 1 == REQUEST_RETRIES => {
|
Err(err) if attempt + 1 == REQUEST_RETRIES => {
|
||||||
|
tracing::warn!(node = %format!("node-{idx}"), %err, "consensus_info failed after retries");
|
||||||
issues.push(ConsensusLivenessIssue::RequestFailed {
|
issues.push(ConsensusLivenessIssue::RequestFailed {
|
||||||
node: format!("node-{idx}"),
|
node: format!("node-{idx}"),
|
||||||
source: err,
|
source: err,
|
||||||
@ -188,12 +188,16 @@ impl ConsensusLiveness {
|
|||||||
if check.issues.is_empty() {
|
if check.issues.is_empty() {
|
||||||
tracing::info!(
|
tracing::info!(
|
||||||
target,
|
target,
|
||||||
|
samples = check.samples.len(),
|
||||||
heights = ?check.samples.iter().map(|s| s.height).collect::<Vec<_>>(),
|
heights = ?check.samples.iter().map(|s| s.height).collect::<Vec<_>>(),
|
||||||
tips = ?check.samples.iter().map(|s| s.tip).collect::<Vec<_>>(),
|
tips = ?check.samples.iter().map(|s| s.tip).collect::<Vec<_>>(),
|
||||||
"consensus liveness expectation satisfied"
|
"consensus liveness expectation satisfied"
|
||||||
);
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
|
for issue in &check.issues {
|
||||||
|
tracing::warn!(?issue, "consensus liveness issue");
|
||||||
|
}
|
||||||
Err(Box::new(ConsensusLivenessError::Violations {
|
Err(Box::new(ConsensusLivenessError::Violations {
|
||||||
target,
|
target,
|
||||||
details: check.issues.into(),
|
details: check.issues.into(),
|
||||||
|
|||||||
@ -58,6 +58,11 @@ impl Expectation for DaWorkloadExpectation {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tracing::info!(
|
||||||
|
planned_channels = self.planned_channels.len(),
|
||||||
|
"DA inclusion expectation starting capture"
|
||||||
|
);
|
||||||
|
|
||||||
let planned = Arc::new(
|
let planned = Arc::new(
|
||||||
self.planned_channels
|
self.planned_channels
|
||||||
.iter()
|
.iter()
|
||||||
@ -113,6 +118,12 @@ impl Expectation for DaWorkloadExpectation {
|
|||||||
};
|
};
|
||||||
let required_inscriptions = minimum_required(planned_total, MIN_INCLUSION_RATIO);
|
let required_inscriptions = minimum_required(planned_total, MIN_INCLUSION_RATIO);
|
||||||
if planned_total.saturating_sub(missing_inscriptions.len()) < required_inscriptions {
|
if planned_total.saturating_sub(missing_inscriptions.len()) < required_inscriptions {
|
||||||
|
tracing::warn!(
|
||||||
|
planned = planned_total,
|
||||||
|
missing = missing_inscriptions.len(),
|
||||||
|
required = required_inscriptions,
|
||||||
|
"DA expectation missing inscriptions"
|
||||||
|
);
|
||||||
return Err(DaExpectationError::MissingInscriptions {
|
return Err(DaExpectationError::MissingInscriptions {
|
||||||
missing: missing_inscriptions,
|
missing: missing_inscriptions,
|
||||||
}
|
}
|
||||||
@ -125,12 +136,25 @@ impl Expectation for DaWorkloadExpectation {
|
|||||||
};
|
};
|
||||||
let required_blobs = minimum_required(planned_total, MIN_INCLUSION_RATIO);
|
let required_blobs = minimum_required(planned_total, MIN_INCLUSION_RATIO);
|
||||||
if planned_total.saturating_sub(missing_blobs.len()) < required_blobs {
|
if planned_total.saturating_sub(missing_blobs.len()) < required_blobs {
|
||||||
|
tracing::warn!(
|
||||||
|
planned = planned_total,
|
||||||
|
missing = missing_blobs.len(),
|
||||||
|
required = required_blobs,
|
||||||
|
"DA expectation missing blobs"
|
||||||
|
);
|
||||||
return Err(DaExpectationError::MissingBlobs {
|
return Err(DaExpectationError::MissingBlobs {
|
||||||
missing: missing_blobs,
|
missing: missing_blobs,
|
||||||
}
|
}
|
||||||
.into());
|
.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tracing::info!(
|
||||||
|
planned = planned_total,
|
||||||
|
inscriptions = planned_total - missing_inscriptions.len(),
|
||||||
|
blobs = planned_total - missing_blobs.len(),
|
||||||
|
"DA inclusion expectation satisfied"
|
||||||
|
);
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,7 +179,10 @@ async fn publish_blob(
|
|||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
Ok(blob_id) => return Ok(blob_id),
|
Ok(blob_id) => return Ok(blob_id),
|
||||||
Err(err) => last_err = Some(err.into()),
|
Err(err) => {
|
||||||
|
tracing::debug!(attempt, executor = %executor.base_url(), %err, "DA: publish_blob failed");
|
||||||
|
last_err = Some(err.into())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -82,6 +82,13 @@ impl Expectation for TxInclusionExpectation {
|
|||||||
return Err(TxExpectationError::NoPlannedTransactions.into());
|
return Err(TxExpectationError::NoPlannedTransactions.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tracing::info!(
|
||||||
|
planned_txs = planned,
|
||||||
|
txs_per_block = self.txs_per_block.get(),
|
||||||
|
user_limit = self.user_limit.map(|u| u.get()),
|
||||||
|
"tx inclusion expectation starting capture"
|
||||||
|
);
|
||||||
|
|
||||||
let wallet_pks = wallet_accounts
|
let wallet_pks = wallet_accounts
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.take(planned)
|
.take(planned)
|
||||||
@ -137,8 +144,20 @@ impl Expectation for TxInclusionExpectation {
|
|||||||
let required = ((state.expected as f64) * MIN_INCLUSION_RATIO).ceil() as u64;
|
let required = ((state.expected as f64) * MIN_INCLUSION_RATIO).ceil() as u64;
|
||||||
|
|
||||||
if observed >= required {
|
if observed >= required {
|
||||||
|
tracing::info!(
|
||||||
|
observed,
|
||||||
|
required,
|
||||||
|
expected = state.expected,
|
||||||
|
"tx inclusion expectation satisfied"
|
||||||
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
|
tracing::warn!(
|
||||||
|
observed,
|
||||||
|
required,
|
||||||
|
expected = state.expected,
|
||||||
|
"tx inclusion expectation failed"
|
||||||
|
);
|
||||||
Err(TxExpectationError::InsufficientInclusions { observed, required }.into())
|
Err(TxExpectationError::InsufficientInclusions { observed, required }.into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -162,6 +162,13 @@ impl<'a> Submission<'a> {
|
|||||||
.cloned()
|
.cloned()
|
||||||
.collect::<VecDeque<_>>();
|
.collect::<VecDeque<_>>();
|
||||||
|
|
||||||
|
tracing::info!(
|
||||||
|
planned,
|
||||||
|
interval_ms = interval.as_millis(),
|
||||||
|
accounts_available = workload.accounts.len(),
|
||||||
|
"transaction workload submission plan"
|
||||||
|
);
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
plan,
|
plan,
|
||||||
ctx,
|
ctx,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user