aboutsummaryrefslogtreecommitdiffstats
path: root/etc/profilicate.py
diff options
context:
space:
mode:
authorSmitty <me@iter.ca>2024-02-05 01:07:19 -0500
committerGitHub <noreply@github.com>2024-02-05 06:07:19 +0000
commite588e93b3bd3bc6040750256b6902a4175dd74a2 (patch)
tree0763ac2f75b36590a424892226124930c387d957 /etc/profilicate.py
parentd7d0451424faf1bf9c705068bea1aa8cf582d6ad (diff)
downloadservo-e588e93b3bd3bc6040750256b6902a4175dd74a2.tar.gz
servo-e588e93b3bd3bc6040750256b6902a4175dd74a2.zip
Convert etc/profilicate.py to Python 3 (#31259)
Diffstat (limited to 'etc/profilicate.py')
-rw-r--r--etc/profilicate.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/profilicate.py b/etc/profilicate.py
index def71933186..3fa35b5ba77 100644
--- a/etc/profilicate.py
+++ b/etc/profilicate.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright 2018 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
@@ -35,10 +35,10 @@ class StringTable:
return self.table[s]
def length(self):
- return len(self.table.keys())
+ return len(list(self.table.keys()))
def contents(self):
- return sorted(self.table.keys(), key=self.table.__getitem__)
+ return sorted(list(self.table.keys()), key=self.table.__getitem__)
with open(sys.argv[1]) as f:
@@ -63,7 +63,7 @@ for sample in samples:
tid = 0
threads = []
-for (name, raw_samples) in sorted(thread_data.iteritems(), key=lambda x: thread_order[x[0]]):
+for (name, raw_samples) in sorted(iter(thread_data.items()), key=lambda x: thread_order[x[0]]):
string_table = StringTable()
tid += 1