Skip to content

Conversation

@syvb
Copy link
Contributor

@syvb syvb commented Feb 5, 2024

Converts etc/profilicate.py (a script for processing raw profiler samples) from Python 2 to Python 3, to make it easier to run on modern systems. I used 2to3, then removed unnecessary double brackets and updated the shebang.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #___ (GitHub issue number if applicable)
  • These changes do not require tests because it is a testing script

@jdm jdm added this pull request to the merge queue Feb 5, 2024
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]]):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the iter() is is not needed in this case, since sorted can consume iterables directly and items() returns view objects that are iterable.

Merged via the queue into servo:main with commit e588e93 Feb 5, 2024
@syvb syvb deleted the py3-profilicate branch February 6, 2024 03:01
Taym95 pushed a commit to Taym95/servo that referenced this pull request Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants