-
Notifications
You must be signed in to change notification settings - Fork 980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track DIPS gas metrics in csv #5215
Conversation
graph/src/components/metrics/gas.rs
Outdated
pub struct GasMetrics { | ||
pub gas_counter: CounterVec, | ||
pub op_counter: CounterVec, | ||
pub gas_counter_map: Arc<RwLock<HashMap<String, u64>>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should use something else instead of a RwLock
256520d
to
c8d46f8
Compare
Lets use object-store, instead of |
graph/src/env/mod.rs
Outdated
|
||
/// Set by the env var `GRAPH_gas_metrics_gcs_bucket` | ||
/// The name of the GCS bucket to store DIPS metrics | ||
pub gas_metrics_object_store_url: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This URL is not just Cloud Storage anymore, now it also supports local file URLs. Worth documenting at least an example value for a local file.
graph/Cargo.toml
Outdated
@@ -71,6 +71,9 @@ itertools = "0.12.0" | |||
# Without the "arbitrary_precision" feature, we get the error `data did not match any variant of untagged enum Response`. | |||
web3 = { git = "https://github.com/graphprotocol/rust-web3", branch = "graph-patches-onto-0.18", features = ["arbitrary_precision"] } | |||
serde_plain = "1.0.2" | |||
csv = "1.3.0" | |||
object_store = { version = "0.9.1", features = ["gcp"] } | |||
cloud-storage = { version = "0.11.1", features = ["global-client"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets remove cloud-storage
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, Yes right, still a work in progress, have some more local changes to be pushed
795bd4c
to
25827fc
Compare
What if we left |
25827fc
to
4e35efd
Compare
0bf7f08
to
da35c2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is very elegant now, great work! Just one comment.
} | ||
|
||
#[derive(Debug)] | ||
pub struct BlockStateMetrics { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd put this in a submodule in a separate file, just to keep things organized. But up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
I don't know if one file per block will be ok or not, but we can move forward with this and evaluate after testing a bit in real-life scenarios. |
No description provided.