Skip to content

Commit

Permalink
fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
AshinGau committed Dec 3, 2024
1 parent 5b502bb commit e7255df
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions src/tx_dependency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,25 +213,6 @@ impl TxDependency {
self.num_finality_txs = num_finality_txs;
}

fn draw_dependent_graph(&self) {
let num_finality_txs = self.num_finality_txs;
for (index, dep) in self.tx_dependency.iter().enumerate() {
let txid = index + num_finality_txs;
let round = self.round.map(|r| format!("round{}", r)).unwrap_or(String::from("none"));
gauge!("node_status",
"id" => format!("tx{}", txid), "status" => "healthy",
"round" => round.clone(), "block_height" => format!("{}", self.block_height))
.set(1.0);
let dep: BTreeSet<TxId> = dep.clone().into_iter().collect();
for dep_id in dep {
gauge!("edge_flow",
"source" => format!("tx{}", txid), "target" => format!("tx{}", dep_id),
"round" => round.clone(), "block_height" => format!("{}", self.block_height))
.set(1.0);
}
}
}

fn skew_analyze(&self, weighted_group: &BTreeMap<usize, Vec<DependentTxsVec>>) {
if !(*DEBUG_BOTTLENECK) {
return;
Expand All @@ -258,7 +239,6 @@ impl TxDependency {
if num_txs < 64 || num_remaining < num_txs / 3 || subgraph.is_empty() {
return;
}
self.draw_dependent_graph();

// ChainLength -> ChainNumber
let mut chains = BTreeMap::new();
Expand Down Expand Up @@ -300,7 +280,9 @@ impl TxDependency {
"fork"
};
counter!("grevm.large_graph", "type" => chain_type, "tip" => tip.clone()).increment(1);
info!("Block({}) has large subgraph, type={}", self.block_height, chain_type);
if self.round.is_none() {
info!("Block({}) has large subgraph, type={}", self.block_height, chain_type);
}
}
}
}

0 comments on commit e7255df

Please sign in to comment.