Misc modules

Log and plot data.

This project basically implements a software scope.

lognplot.install_tracer()

Install an intense application tracer.

The tracer will track: - function entry / exit - python logging system messages

Traced events will be forwarded to the lognplot GUI.

Implement client connection to lognplot protocol.

class lognplot.client.LognplotTcpClient(hostname='localhost', port=12345)

Use this client to transmit sample to the lognplot tool.

connect()

Connect to the server.

send_event(name, timestamp, attributes)

Emit an event.

Attributes can be given as a dictionary of key/value strings.

send_function_enter(name, timestamp, function_name)

Trace function entry.

send_function_exit(name, timestamp)

Trace function entry.

send_sample(name: str, timestamp, value: float)

Send a single timestamp / value pair to the trace with the given name.

send_sample_batch(name: str, samples)

Send a batch of samples.

samples is a list of tuples of what you would pass to send_sample.

send_samples(name: str, timestamp, dt: float, samples)

Send equidistant spaced samples.

lognplot.client.coerce_timestamp(timestamp) → float

Convert a timestamp into a floating point number.

class lognplot.time.duration.Duration(attos)

Relative duration of time.

classmethod from_milli_seconds(millis)

Create a duration with the given amount of milli-seconds.

classmethod from_nano_seconds(nanos)

Create a duration with the given amount of nano-seconds.

classmethod from_seconds(seconds)

Create a duration with the given amount of seconds.

to_seconds() → float

Return the amount of seconds in this duration.