Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Issue 22428004: Refactoring functions in metrics/smoothness.py (Closed)

Created:
7 years, 4 months ago by qyearsley
Modified:
7 years, 4 months ago
Reviewers:
tonyg
CC:
chromium-reviews, chrome-speed-team+watch_google.com
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Refactoring functions in metrics/smoothness.py BUG=

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -113 lines) Patch
M tools/perf/metrics/smoothness.py View 3 chunks +100 lines, -113 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
qyearsley
The main change was factoring out two functions, which are used by several of the ...
7 years, 4 months ago (2013-08-06 23:47:07 UTC) #1
qyearsley
7 years, 4 months ago (2013-08-06 23:49:40 UTC) #2
On 2013/08/06 23:47:07, qyearsley wrote:
> The main change was factoring out two functions, which are used by several of
> the Calc* functions: _AddDeltaResult,  _AddAverageTimeResult.
> 
> The goal is to try to improve readability.  Also, the variable names used
before
> were CapitalCamelCase whereas it seems the style guide suggests
> lower_with_underscores for variables.
> 
> The behavior should be the same as before. I ran the smoothness metric before
> and after and briefly looked at the output, and there seemed to be no
> difference.

Later, when the Calc* functions are changed to become private methods that are
used by AddResults (and renamed to _Add*), they could also be simplified by
making them a nested inside of AddResults, and then the "deltas" and "results"
arguments wouldn't need to be passed to each of these functions...

Powered by Google App Engine
This is Rietveld 408576698