Skip to content

Make it possible to somehow write output from spectrogram view #1707

@dardhal

Description

@dardhal

Is your feature request related to a problem? Please describe.
:spectrogram is sometimes extremely useful to spot performance deviations from normal. Visually, it helps a human being quickly see where the problem is.

As "lnav" gets integrated into diverse log analysis pipelines and AI harnesses, having the option to save the output from the spectrogram view to file / stdout (when using :external-access) would come handy.

Describe the solution you'd like
I have thought of two possible approaches here :

  • lnav may be improved to output the colored information which is shown on the screen (using ANSI escape codes?), and let the consumer of this information to interpret it. This would hopefully allow the interactive spectrogram view to be shown in other tools which call lnav under the hood
  • Or we can go the machine-readable way, and make lnav dump the underlying dataset used to draw the spectrogram on the screen, in a machine-consumable way (CSV / JSON). Then the consumer of that information can decide how to process the information, how to analyze it, and how to present to the user , if applicable

Describe alternatives you've considered
The two ones mentioned above.
Second seems to be more useful and future proof, and may even be easier.

Currently, ":write-screen-to" or similar commands write the timestamps, but not any information to "draw" the histogram itself.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions