Skip to content

Commit

Permalink
v0.15 released, updated prometheus values
Browse files Browse the repository at this point in the history
  • Loading branch information
pinaxgit committed Sep 6, 2023
1 parent d260aca commit a5eec99
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion eosio.cpu/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "eosio_cpu"
version = "0.14.0"
version = "0.15.0"
authors = [
"Denis <denis@pinax.network>",
"Yaro <yaro@pinax.network>",
Expand Down
9 changes: 5 additions & 4 deletions eosio.cpu/src/sinks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ pub fn prom_out(map_transfers: TransferEvents) -> Result<PrometheusOperations, E

let transfer_label = HashMap::from([
("producer".to_string(), transfer.producer.to_string()),
("from".to_string(), transfer.from.to_string())
//("from".to_string(), transfer.from.to_string())
]);

prom_out.push(Gauge::from("cpu_usage").with(transfer_label.clone()).set(transfer.cpu_usage as f64));
prom_out.push(Gauge::from("net_usage").with(transfer_label.clone()).set(transfer.net_usage as f64));
prom_out.push(Gauge::from("tx_count").with(transfer_label.clone()).set(transfer.tx_count as f64));
prom_out.push(Counter::from("cpu_usage").with(transfer_label.clone()).add(transfer.cpu_usage as f64));
prom_out.push(Counter::from("net_usage").with(transfer_label.clone()).add(transfer.net_usage as f64));
prom_out.push(Counter::from("tx_count").with(transfer_label.clone()).inc());

}
Ok(prom_out)
}
2 changes: 1 addition & 1 deletion eosio.cpu/substreams.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
specVersion: v0.1.0
package:
name: eosio_cpu
version: v0.14.0
version: v0.15.0
url: https://github.com/pinax-network/substreams
doc: Antelope `eosio.cpu` based action traces & database operations.

Expand Down

0 comments on commit a5eec99

Please sign in to comment.