Bug 260721 - Refactor compare-results to have more consistent style
Summary: Refactor compare-results to have more consistent style
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-25 11:00 PDT by james
Modified: 2023-09-01 13:41 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description james 2023-08-25 11:00:16 PDT
Refactor the compare-results script to make it simpler to add in new versions of previous benchmarks.

1. Have the script align with the PEP 8 style guideline by at least changing function names, variable names, and resolve inconsistent spacing issues.
2. Remove unreachable code and reduce redundant/repeated code

This is a follow up to https://github.com/WebKit/WebKit/pull/16794#discussion_r1302207710
Comment 1 Radar WebKit Bug Importer 2023-09-01 11:01:14 PDT
<rdar://problem/114829494>
Comment 2 hysu 2023-09-01 13:41:20 PDT
On further thought, it's probably not the best idea to do style cleanup for the sake of style cleanup in this case, since it'll obfuscate the change history quite a bit and may break other scripts that depend on these functions. For example, I think renaming all the functions to not be camelcase just for the sake of being good Pythonic style is probably not the thing to do here.

Though, I think there is a value to combining duplicated logic and auditing it to make sure that everything we expect to run is running - but at that point, it's not really a style change patch anymore.