From 14a40b99735f09f6e70b8e897acbb622f9115ca3 Mon Sep 17 00:00:00 2001 From: Mac Mollison Date: Sat, 13 Mar 2010 12:09:00 -0500 Subject: Directory restructuring Reworked directory (and modified some code a bit) to match intended architecture. --- reader/sample_script.py | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100755 reader/sample_script.py (limited to 'reader/sample_script.py') diff --git a/reader/sample_script.py b/reader/sample_script.py deleted file mode 100755 index f7e9297..0000000 --- a/reader/sample_script.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/python - -# This is a sample script for using the tool. I would recommend copying -# this and modifying it to suit your needs for a particular test. Make -# sure you redirect the output to a file (e.g. ./sample_script.py > output). - -# Import the modules we need. You should not need to know about -# their internals. -import trace_reader -import sanitizer -import gedf_test -import stats -import stdout_printer - -# Specify your trace files -g6 = [ -'../sample_traces/st-g6-0.bin', -'../sample_traces/st-g6-1.bin', -'../sample_traces/st-g6-2.bin', -'../sample_traces/st-g6-3.bin', -] - -# Here is an example of a custom filter function. -# It will remove from the error stream all inversion_end records indicating -# an inversion of less than 4000000 time units. Thus, you can grep through -# the output looking 'Inversion end' and find only errors for particularly -# long inversions. This is commented out in the pipeline (below) since you -# probably don't want it in general. -def my_filter(record): - if record.record_type == 'error' and record.type_name == 'inversion_end': - if record.job.inversion_end - record.job.inversion_start < 4000000: - return False - return True - -# Pipeline -stream = trace_reader.trace_reader(g6) # Read events from traces -stream = sanitizer.sanitizer(stream) # Remove garbage events -stream = gedf_test.gedf_test(stream) # Produce G-EDF error records -stream = stats.stats(stream) # Produce a statistics record -#stream = filter(my_filter, stream) # Filter some records before printing -stdout_printer.stdout_printer(stream) # Print records to stdout -- cgit v1.2.2