Lola – Stream-based Runtime Monitoring

Lola is simple and expressive stream-based specification language: it can describe both correctness/failure assertions along with interesting statistical measures. It combines the ease-of-use of rule-based specification languages with the expressive power of heavy-weight scripting languages or temporal logics previously needed for the description of complex stateful dependencies. The language comes with two key features: template stream expressions, which allow parameterization with data, and dynamic stream generation, where new properties can be monitored on their own time scale. We give an overview on the development and the current state of our tool in addition to a series of applications, which demonstrate the capabilities of the specification language Lola and its descendants.

Lola

The tool is available as a pre-compiled binary for MacOS X and Linux. For MacOS a working Swift 4 environment is required, for Linux the necessary environment can most easily be obtained via a Docker container here.

Tool Usage

$ ./Lola --help
./Lola options:
 	 -h,--help			 	show this help and exit
 	 -s,--specification <Lola specification file>
 	 --csv <Input trace file>	 	optional: reads offline input from specified CSV-file
 	 --csv-skip-header 			skip csv header
 	 --binary <Input trace file>		reads binary input from file, "-" for stdin
 	 --statistics				display statistics
 	 --hide-trigger				do not print triggers
 	 --print-outputs			display monitor outputs
 	 --analysis			 	perform specification analysis only
 	 --depgraph				print dependency graph in dot format
 	 --debug			 	display debugging information
 	 --delimiter <char>		 	set delimiter for CSV (default: ",") and stdin (default: " ")

Inputs

You need to provide a valid Lola specification using the -s option.
Two types of inputs are possible:

Dependency Graph

A dot -representation of the dependency graph can be generated by executing ./Lola -s spec.lola --depgraph.

Test Data

Synthetic Test Data

The synthetic test data was generated with a python script contained in the archive below. It generates a trace file containing floating point values of arbitrary length and column width, either in CSV-format or in a Binary representation. By executing python3 randomDouble.py --help, the list of commandline options is displayed.

Amazon Review Data

The provided folder contains the Lola specification. The .csv-files containing product review rating data from Amazon can be obtained from here. (The ratings-only .csv files are sufficient for our specification.)
The number of unique product identifiers can be computed via: cut -d , -f 2 ratings_Amazon_Instant_Video.csv | sort | uniq | wc -l.

Specifications

All specifications, scripts and our raw data can be downloaded here.

Experimental Evaluation

All experiments were executed on a Macbook Pro (2016) laptop with a quadcore 2.7GHz i7 CPU, 16 GB RAM and an Apple SSD.

Varying input rates

To modify the input rate to the monitoring process, we use the cstream tool with its -t-option to slow down the incoming pipe. This works best for binary input data, where the size of every event is fixed. To have an input rate of 10Hz for a specification with three floating point inputs (24 Bytes per event), the call would be:
$cat trace.dat | cstream -O f -b 24 -t -240 | ./Lola -s spec.lola --print-outputs --binary -.

Time and Memory measurements

Within the program, we measure time by using timer facilities and output them after the monitor has finished.
Memory is measured via the maximum resident set size of the process using a Mach Kernel call. On Linux, this may be done externally using the GNU time utility.

Tool limitations

Contact

If you have questions or problems, please do not hesitate to contact Peter Faymonville, Maximilian Schwenger, Hazem torfah.