Skip to content

redhat-partner-solutions/vse-sync-pp

Repository files navigation

vse-sync-pp

This repository contains python modules for analyzing and generating synchronization test results by means of consuming input data coming from:

  • ptp4l, ts2phc, and phc2sys logs coming from PTP operator logs

  • collector files generated by collector tools developed in collectors

These are the main python modules:

  • demux: Demultiplex gathered data messages of a given identifier coming from a single multiplexed data source. This module consumes directly data coming from collectors. For each demultiplexed data message of a given identifier print the canonical data produced by the parser as JSON. The module leverages parse module to generate its output.

  • parse: Parse data messages of a given identifier from a single data source. When used standalone (without demux module) the data source comes from PTP operator logs. For each parsed data message print the canonical data produced by the parser as JSON.

  • analyze: Analyze data messages from a single source. Analyze data parsed from the log messages in input. Print the test result and data analysis as JSON.

  • plot: plot data parsed from data messages coming from a single source. The data parsed from incoming data messages is plotted to an image file.

Running

Demux collector data from file

To see the collector demuxers available:

python3 -m vse_sync_pp.demux --help

To filter a specific collector from file aggregating several collectors:

python3 -m vse_sync_pp.demux <filename> <filter>

To filter a collector presented on stdin:

python3 -m vse_sync_pp.demux - <filter>

Parse a log file

To see the parsers available:

python3 -m vse_sync_pp.parse --help

To parse an existing log file:

python3 -m vse_sync_pp.parse <filename> <parser>

To parse data presented on stdin:

python3 -m vse_sync_pp.parse - <parser>

To output timestamps relative to the timestamp of the first accepted log line:

python3 -m vse_sync_pp.parse --relative <filename> <parser>

Plot unfiltered log data

To see the parsers available:

python3 -m vse_sync_pp.plot --help

To plot data from existing log file <filename> to <image>:

python3 -m vse_sync_pp.plot <filename> <parser> <image>

To plot data presented on stdin:

python3 -m vse_sync_pp.plot - <parser> <image>

To plot already parsed (canonical) data:

python3 -m vse_sync_pp.plot --canonical <filename> <parser> <image>

Analyze unfiltered log data

To see the analyzers available:

python3 -m vse_sync_pp.analyze --help

To analyze data from existing log file:

python3 -m vse_sync_pp.analyze <filename> <analyzer>

To analyze data presented on stdin:

python3 -m vse_sync_pp.analyze - <analyzer>

To analyze already parsed (canonical) data:

python3 -m vse_sync_pp.analyze --canonical <filename> <analyzer>

Contributing to the repo

See the contribution guide for detailed instructions on how to get started contributing to this repo.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages