Ported to python3
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
20ebb95c7a
commit
3cea4bad5f
1 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
#! /usr/bin/python
|
||||
#! /usr/bin/python3
|
||||
# Copyright (C) 2018-2020 Merspieler, merspieler _at_ airmail.cc
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
|
@ -82,10 +82,10 @@ if read_src:
|
|||
try:
|
||||
with open(ifile) as f:
|
||||
for line in f:
|
||||
match = re.findall("SpawnPoolWorker-\d+ root INFO +Time used in seconds for (.*): (\d+\.\d+)", line)
|
||||
match = re.findall("Time used in seconds for (.*): (\d+\.\d+)", line)
|
||||
if match != []:
|
||||
times.append(match[0])
|
||||
match = re.findall("SpawnPoolWorker-\d+ root INFO +(Reading OSM .* data for \['.*'\]) from db took (\d+\.\d+) seconds.", line)
|
||||
match = re.findall("(Reading OSM .* data for \['.*'\]) from db took (\d+\.\d+) seconds.", line)
|
||||
if match != []:
|
||||
times.append(match[0])
|
||||
except:
|
||||
|
@ -124,4 +124,4 @@ i = len(sortkey) - 1
|
|||
while i >= 0:
|
||||
tasks.sort(key=lambda tasks: tasks[sortkey[i]], reverse=True)
|
||||
i -= 1
|
||||
print tabulate(tasks,headers="keys",floatfmt=".2f")
|
||||
print (tabulate(tasks,headers="keys",floatfmt=".2f"))
|
||||
|
|
Loading…
Reference in a new issue