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

Issue 7745007: Pyauto performance tests now output data to be graphed using autotest. (Closed)

Created:
9 years, 4 months ago by dennis_jeffrey
Modified:
9 years, 4 months ago
Reviewers:
truty, Nirnimesh
CC:
chromium-reviews, Nirnimesh, John Grabowski, anantha, dyu1, Paweł Hajdan Jr., dennis_jeffrey
Visibility:
Public.

Description

Pyauto performance tests now output data to be graphed using autotest. BUG=chromium-os:18185 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98517

Patch Set 1 #

Total comments: 10

Patch Set 2 : Addressed review comments. #

Total comments: 4

Patch Set 3 : Addressed second round of review comments. #

Total comments: 17

Patch Set 4 : Addressed latest review comments. #

Patch Set 5 : Now computing sample standard deviation. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -17 lines) Patch
M chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py View 1 2 3 3 chunks +21 lines, -1 line 0 comments Download
M chrome/test/functional/perf.py View 1 2 3 4 9 chunks +51 lines, -16 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
dennis_jeffrey
9 years, 4 months ago (2011-08-24 23:24:44 UTC) #1
Nirnimesh
It'd be nicer if you could get rid of the temp file and directly interpret ...
9 years, 4 months ago (2011-08-25 00:23:36 UTC) #2
dennis_jeffrey
I got rid of the temp file as suggested. http://codereview.chromium.org/7745007/diff/1/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py File chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py (right): http://codereview.chromium.org/7745007/diff/1/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py#newcode19 chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py:19: ...
9 years, 4 months ago (2011-08-25 01:30:35 UTC) #3
Nirnimesh
http://codereview.chromium.org/7745007/diff/4/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py File chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py (right): http://codereview.chromium.org/7745007/diff/4/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py#newcode82 chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py:82: stderr=subprocess.STDOUT).communicate()[0] check for the process's return code and raise ...
9 years, 4 months ago (2011-08-25 01:39:43 UTC) #4
dennis_jeffrey
http://codereview.chromium.org/7745007/diff/4/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py File chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py (right): http://codereview.chromium.org/7745007/diff/4/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py#newcode82 chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoPerfTests/desktopui_PyAutoPerfTests.py:82: stderr=subprocess.STDOUT).communicate()[0] On 2011/08/25 01:39:43, Nirnimesh wrote: > check for ...
9 years, 4 months ago (2011-08-25 02:24:43 UTC) #5
truty
This is neat to see. One other thing, it's typical in Autotest to include a ...
9 years, 4 months ago (2011-08-25 04:25:00 UTC) #6
Nirnimesh
Code I commented on LGTM
9 years, 4 months ago (2011-08-25 06:42:19 UTC) #7
dennis_jeffrey
Thanks you both for looking over this code. Mike - I addressed all of your ...
9 years, 4 months ago (2011-08-25 22:33:05 UTC) #8
truty
All in all, I only have todo's left so lgtm. What throws me is that ...
9 years, 4 months ago (2011-08-26 20:33:00 UTC) #9
truty
ok, i see the updates: lgtm
9 years, 4 months ago (2011-08-26 20:35:06 UTC) #10
dennis_jeffrey
9 years, 4 months ago (2011-08-26 23:23:54 UTC) #11
Submitting this now - thank you!

http://codereview.chromium.org/7745007/diff/3002/chrome/test/functional/perf.py
File chrome/test/functional/perf.py (right):

http://codereview.chromium.org/7745007/diff/3002/chrome/test/functional/perf....
chrome/test/functional/perf.py:74: std_dev = math.sqrt(sum(temp_vals) /
len(temp_vals))
On 2011/08/26 20:33:00, truty wrote:
> On 2011/08/25 22:33:05, dennis_jeffrey wrote:
> > On 2011/08/25 04:25:01, truty wrote:
> > > This illustrates why I use a Python stats lib instead of writing these.  I
> > think
> > > you want to float() the len(temp_vals) otherwise this could end up being
int
> > > division which would incur unexpected rounding.  Also, you're calculating
> the
> > > population stddev opposed to sample and I think sample is the more common
> > > approach.
> > 
> > Originally Nirnimesh had recommended I use the "numpy" module for computing
> > avg/std dev, but we found out that it's a third-party library that we could
> not
> > always count on to be present on all the platforms (e.g., it seemed to exist
> on
> > Linux and not Windows).  Since we'd like these perf tests to also run on
> chrome
> > on Windows, we decided to leave it like this.
> > 
> > That is a great point about being careful of integer division unexpectedly
> > cropping up.  However, I think it shouldn't happen here, unless I'm missing
> > something (in which case I'd like to hear where I'm wrong!).  The reason is
> that
> > the division at line 74 above depends upon "sum(temp_vals)", which itself is
> the
> > sum of a set of list elements computed at line 73.  Each list element is
> > computed by squaring a value 'x - avg', with 'avg' being computed at line
72. 
> > 'avg' should be a float because it is computed using "float(sum(values))". 
> This
> > should mean that the expression 'x - avg' should also be a float, making its
> > square a float, making each element of the "temp_vals" list a float, making
> > "sum(temp_vals)" in line 74 a float, preventing integer division at that
line.
> 
> > I could be wrong here, so please let me know if I am - I just wanted to
check
> to
> > make sure I understand this properly.
> > 
> > You're right about the population vs. sample std dev point you bring up.  I
> was
> > reading a bit about the different types of std dev, and I see that "sample"
is
> > more commonly-used (according to wikipedia).  The reason I originally went
> with
> > "population" was because I figured I just want the std dev of the given set
of
> > measurements, which seems to form the "complete population" (but I am not
sure
> > whether that reasoning is correct).  But a benefit of using "sample" is that
> the
> > standard deviation value would be larger, which seems like a more
conservative
> > value to report.  Do you recommend that I change it to "sample"?
> 
> -I use a Python stats library that is opensource - we should discuss it this
> week.
> -You're right about the float.  I'm just paranoid I guess - sorry.
> -I prefer the sample stddev - please check with jrbarnette for a final
> preference though.

I changed the computation to "sample" std dev based on suggestion by jrbarnette.

Powered by Google App Engine
This is Rietveld 408576698