input_traces Package

input_traces Package

input_logger Module

class sts.input_traces.input_logger.InputLogger[source]

Bases: object

Log input events injected by a control_flow.Fuzzer

__init__()[source]
allow_timeouts()[source]
close(control_flow, simulation_cfg, skip_mcs_cfg=False)[source]
disallow_timeouts()[source]
dump_buffered_events(events)[source]

If there were un-acknowledge message receives or state changes at the end of the run, dump them to a separate input trace ”.unacked”

log_input_event(event)[source]

Log the event as a json hash. Note that we log dataplane events in a separate pickle log, so we optionally allow a packet parameter to be logged separately.

open(results_dir=None)[source]

log_parser Module

Parses `superlog’s and returns a list of sts.event.Event objects

`superlog’ format: Each line is a json hash representing either an internal event or an external input event.

Event hashes must have at least the following keys:

‘label’: any unique identifier ‘class’: the name of the corresponding python class that

encapsulates this event type, e.g. ‘LinkFailure’. These classes can be found in sts/event.py

Hashes may have additional custom keys. For example, external input events must the following key:

‘dependent_labels’: list of dependent labels (internal events that will not occur if this
event is pruned)
sts.input_traces.log_parser.check_legacy_format(json_hash)[source]
sts.input_traces.log_parser.check_unique_label(event_label, existing_event_labels)[source]

Check to make sure that event_label is not in existing_event_labels. Throw an exception if this invariant does not hold.

If the invariant does hold, add event_label to existing_event_labels.

sts.input_traces.log_parser.parse(logfile)[source]

Input: logfile.

Output: A list of all the internal and external events in the order in which they exist in the logfile. Each internal event is annotated with the set of source events that are necessary conditions for its occurence.

sts.input_traces.log_parser.parse_path(logfile_path)[source]

Input: path to a logfile.

Output: A list of all the internal and external events in the order in which they exist in the logfile. Each internal event is annotated with the set of source events that are necessary conditions for its occurence.

sts.input_traces.log_parser.sanity_check_external_input_event(existing_event_labels, dependent_labels, json_hash)[source]

Takes an external event json hash and checks that no dependents have already occured. Raises an exception if any have, otherwise populates dependent_labels

sts.input_traces.log_parser.sanity_check_internal_event(existing_event_labels, dependent_labels, json_hash)[source]

Takes an internal event json hash and removes it from the set of dependent labels that must be present before the end of the log.

Table Of Contents

Previous topic

topology_loader Package

Next topic

syncproto Package

This Page