|
|
f07388 |
diff -aurp a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py
|
|
|
f07388 |
--- a/tools/perf/scripts/python/exported-sql-viewer.py 2019-11-11 12:17:42.000000000 +0000
|
|
|
f07388 |
+++ b/tools/perf/scripts/python/exported-sql-viewer.py 2019-12-10 18:16:19.027985531 +0000
|
|
|
f07388 |
@@ -1573,7 +1573,7 @@ class SQLTableDialogDataItem():
|
|
|
f07388 |
return str(lower_id)
|
|
|
f07388 |
|
|
|
f07388 |
def ConvertRelativeTime(self, val):
|
|
|
f07388 |
- print "val ", val
|
|
|
f07388 |
+ print("val ", val)
|
|
|
f07388 |
mult = 1
|
|
|
f07388 |
suffix = val[-2:]
|
|
|
f07388 |
if suffix == "ms":
|
|
|
f07388 |
@@ -1595,29 +1595,29 @@ class SQLTableDialogDataItem():
|
|
|
f07388 |
return str(val)
|
|
|
f07388 |
|
|
|
f07388 |
def ConvertTimeRange(self, vrange):
|
|
|
f07388 |
- print "vrange ", vrange
|
|
|
f07388 |
+ print("vrange ", vrange)
|
|
|
f07388 |
if vrange[0] == "":
|
|
|
f07388 |
vrange[0] = str(self.first_time)
|
|
|
f07388 |
if vrange[1] == "":
|
|
|
f07388 |
vrange[1] = str(self.last_time)
|
|
|
f07388 |
vrange[0] = self.ConvertRelativeTime(vrange[0])
|
|
|
f07388 |
vrange[1] = self.ConvertRelativeTime(vrange[1])
|
|
|
f07388 |
- print "vrange2 ", vrange
|
|
|
f07388 |
+ print("vrange2 ", vrange)
|
|
|
f07388 |
if not self.IsNumber(vrange[0]) or not self.IsNumber(vrange[1]):
|
|
|
f07388 |
return False
|
|
|
f07388 |
- print "ok1"
|
|
|
f07388 |
+ print("ok1")
|
|
|
f07388 |
beg_range = max(int(vrange[0]), self.first_time)
|
|
|
f07388 |
end_range = min(int(vrange[1]), self.last_time)
|
|
|
f07388 |
if beg_range > self.last_time or end_range < self.first_time:
|
|
|
f07388 |
return False
|
|
|
f07388 |
- print "ok2"
|
|
|
f07388 |
+ print("ok2")
|
|
|
f07388 |
vrange[0] = self.BinarySearchTime(0, self.last_id, beg_range, True)
|
|
|
f07388 |
vrange[1] = self.BinarySearchTime(1, self.last_id + 1, end_range, False)
|
|
|
f07388 |
- print "vrange3 ", vrange
|
|
|
f07388 |
+ print("vrange3 ", vrange)
|
|
|
f07388 |
return True
|
|
|
f07388 |
|
|
|
f07388 |
def AddTimeRange(self, value, ranges):
|
|
|
f07388 |
- print "value ", value
|
|
|
f07388 |
+ print("value ", value)
|
|
|
f07388 |
n = value.count("-")
|
|
|
f07388 |
if n == 1:
|
|
|
f07388 |
pass
|