Skip to content

Measurements: switch to InfluxDB#60

Open
niccantieni wants to merge 3 commits intonsg-ethz:mainfrom
niccantieni:noq
Open

Measurements: switch to InfluxDB#60
niccantieni wants to merge 3 commits intonsg-ethz:mainfrom
niccantieni:noq

Conversation

@niccantieni
Copy link
Copy Markdown
Contributor

This replaces the slightly misused prometheus with a solution mabye better suited for one-off measurements, InfluxDB. Further, a NESQUIC_RUN_LABEL has been added to the script, which enables the user to then select runs in grafana to view.

Copy link
Copy Markdown
Collaborator

@lbrndnr lbrndnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! I've added a couple of minor comments :)

Comment thread nesquic/src/metrics/mod.rs Outdated
s.replace(',', "\\,").replace('=', "\\=").replace(' ', "\\ ")
}

fn build_tag_str(tags: &HashMap<String, String>) -> String {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function gets used only push_all. I think it would be cleaner if this was nested within push_all.

Comment thread nesquic/src/metrics/mod.rs Outdated



fn escape_tag(s: &str) -> String {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could nest this into build_tag_str.

Comment thread nesquic/src/metrics/mod.rs Outdated
fn collect_line_protocol(tag_str: &str, timestamp_ns: u128) -> Result<String> {
let mut lines: Vec<String> = Vec::new();

{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think this closure is necessary, i.e. the extraneous '{' and '}'

Comment thread nesquic/src/metrics/mod.rs Outdated
}
}

{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants