Skip to content

Invalid Json #26

@pvouzis

Description

@pvouzis

I use the "--quiet" flag in order to get a json and them extract the fields from it.

In the following put there is an error printed on the bottom which obviously makes the whole output not a valid json. If the intention of the "--quiet" flag was to output a parsable json, then this format breaks it. One way to deal with this would be to make the error message part of the json and not print it on stderr.

I guess I could also parse just stdout and avoid stderr, but also sometimes the errors need to be parsed.

$> mach --quiet
{
  "unloaded_latency_ms": 44.218,
  "jitter_ms": 7.766,
  "download": {
    "throughput": 3448468,
    "loaded_latency_ms": 1348.036,
    "rpm": 0
  },
  "upload": {
    "throughput": 13107200,
    "loaded_latency_ms": 819.318,
    "rpm": 0
  }
}
2025-03-26T15:42:24.664887Z ERROR mach::rpm: error uploading aim results: channel closed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions