MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / parse_batch

Function parse_batch

nodedb/src/engine/timeseries/ilp.rs:114–120  ·  view source on GitHub ↗

Parse a batch of ILP lines. Skips empty lines and comments.

(input: &str)

Source from the content-addressed store, hash-verified

112
113/// Parse a batch of ILP lines. Skips empty lines and comments.
114pub fn parse_batch(input: &str) -> Vec<Result<IlpLine<'_>, IlpError>> {
115 input
116 .lines()
117 .filter(|l| !l.trim().is_empty() && !l.trim().starts_with('#'))
118 .map(parse_line)
119 .collect()
120}
121
122fn parse_measurement_tags(s: &str) -> Result<MeasurementTags<'_>, IlpError> {
123 let mut parts = s.splitn(2, ',');

Callers 9

execute_ilp_ingestMethod · 0.85
infer_schema_from_ilpFunction · 0.85
ingest_ilp_batchFunction · 0.85
mixed_field_typesFunction · 0.85
batch_parseFunction · 0.85

Calls 2

collectMethod · 0.80
is_emptyMethod · 0.45

Tested by 8

infer_schema_from_ilpFunction · 0.68
ingest_ilp_batchFunction · 0.68
mixed_field_typesFunction · 0.68
batch_parseFunction · 0.68