Skip to content

Commit

Permalink
Port tools
Browse files Browse the repository at this point in the history
  • Loading branch information
velconia committed Aug 23, 2018
1 parent 0dc5d9c commit 41c1079
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tools/check_ctest_hung.py
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function

import sys
import re

Expand Down Expand Up @@ -46,7 +48,7 @@ def main():
start_parts = escape(l).split(" ")
m = re.search("Start\s+[0-9]+\:\s([a-z0-9_]+)", escape(l))
started.add(m.group(1))
print "Diff: ", started - passed
print("Diff: ", started - passed)


if __name__ == "__main__":
Expand Down
5 changes: 3 additions & 2 deletions tools/timeline.py
Expand Up @@ -14,6 +14,7 @@

import argparse
import json
import six
import sys
import unittest

Expand Down Expand Up @@ -124,7 +125,7 @@ def _allocate_pid(self):
return cur_pid

def _allocate_pids(self):
for k, profile_pb in self._profile_dict.iteritems():
for k, profile_pb in six.iteritems(self._profile_dict):
for event in profile_pb.events:
if event.type == profiler_pb2.Event.CPU:
if (k, event.device_id, "CPU") not in self._devices:
Expand All @@ -140,7 +141,7 @@ def _allocate_pids(self):
(k, event.device_id), pid)

def _allocate_events(self):
for k, profile_pb in self._profile_dict.iteritems():
for k, profile_pb in six.iteritems(self._profile_dict):
for event in profile_pb.events:
if event.type == profiler_pb2.Event.CPU:
type = "CPU"
Expand Down

0 comments on commit 41c1079

Please sign in to comment.