Commit 9dc19cc0 authored by Ivan Tyagov's avatar Ivan Tyagov

Python2 -> Python3.

parent 59a963f0
""" """
Parse logical analyzer logs. Used together with test_latency.c as generator. Parse logical analyzer logs. Used together with test_latency.c as generator.
Usage: python2 analyze.py digital.csv Usage: python3 analyze.py digital.csv
""" """
import sys import sys
import statistics import statistics
...@@ -82,24 +82,24 @@ channel1_min = min(timestamp_channel1_delta_list) ...@@ -82,24 +82,24 @@ channel1_min = min(timestamp_channel1_delta_list)
channel1_max = max(timestamp_channel1_delta_list) channel1_max = max(timestamp_channel1_delta_list)
stop_time = lines_list[-1].split(",")[0] stop_time = lines_list[-1].split(",")[0]
print "Timestamp records = ", len(lines_list) print("Timestamp records = ", len(lines_list))
print "Duration (seconds) = ", stop_time print("Duration (seconds) = ", stop_time)
print "Channel0 (in seconds):" print("Channel0 (in seconds):")
print "\tMean = ", channel0_mean print("\tMean = ", channel0_mean)
print "\tMedian = ", channel0_median print("\tMedian = ", channel0_median)
print "\tMin = ", channel0_min print("\tMin = ", channel0_min)
print "\tMax = ", channel0_max print("\tMax = ", channel0_max)
print "\tStandart deviation = ", channel0_stdev print("\tStandart deviation = ", channel0_stdev)
print "\tMode (most occurencies) = ", channel0_mode print("\tMode (most occurencies) = ", channel0_mode)
print "\nChannel1 (in seconds):" print("\nChannel1 (in seconds):")
print "\tMean = ", channel1_mean print("\tMean = ", channel1_mean)
print "\tMedian = ", channel1_median print("\tMedian = ", channel1_median)
print "\tMin = ", channel1_min print("\tMin = ", channel1_min)
print "\tMax = ", channel1_max print("\tMax = ", channel1_max)
print "\tStandart deviation = ", channel1_stdev print("\tStandart deviation = ", channel1_stdev)
print "\tMode (most occurencies) = ", channel1_mode print("\tMode (most occurencies) = ", channel1_mode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment