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

Issue 11273081: Adding a test for measuring memory usage. (Closed)

Created:
8 years, 1 month ago by marja
Modified:
8 years, 1 month ago
Reviewers:
tonyg, nduca
CC:
chromium-reviews, pam+watch_chromium.org, jochen (gone - plz use gerrit), James Simonsen, Danh Nguyen, dtu, hartmanng
Visibility:
Public.

Description

Telemetry multi page testing FW: Add a proof-of-concept memory test. We currently measure memory usage in page cycler tests, but we'd need more realistic and longer running tests to get better memory statistics. The test works against Web Page Replay data, and uses Telemetry to execute actions on pages. Actual tests still need to be added. BUG=158323 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=167908

Patch Set 1 #

Patch Set 2 : less hacky #

Patch Set 3 : Interactions. #

Patch Set 4 : rebased #

Total comments: 1

Patch Set 5 : update #

Total comments: 14

Patch Set 6 : code review (tonyg) & rebased #

Patch Set 7 : Split out interactions. #

Total comments: 4

Patch Set 8 : updated #

Total comments: 4

Patch Set 9 : Moving interactions to MultiPageBenchmark #

Patch Set 10 : Even simpler. #

Patch Set 11 : fix: wait more. #

Patch Set 12 : adding tests #

Patch Set 13 : . #

Total comments: 5

Patch Set 14 : Code review (nduca) #

Total comments: 10

Patch Set 15 : Code review (nduca) #

Total comments: 20

Patch Set 16 : code review (nduca) #

Total comments: 6

Patch Set 17 : Code review (tonyg, nduca) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -74 lines) Patch
M tools/perf/page_sets/top_25.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -4 lines 0 comments Download
A tools/perf/perf_tools/memory_benchmark.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 1 chunk +26 lines, -0 lines 0 comments Download
A tools/telemetry/telemetry/all_page_interactions.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +20 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/browser_options.py View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/click_to_navigate_interaction.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -3 lines 0 comments Download
M tools/telemetry/telemetry/compound_interaction.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +10 lines, -5 lines 0 comments Download
M tools/telemetry/telemetry/compound_interaction_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -2 lines 0 comments Download
A tools/telemetry/telemetry/discover.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +40 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/inspector_page_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 2 chunks +3 lines, -4 lines 0 comments Download
M tools/telemetry/telemetry/multi_page_benchmark.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +3 lines, -3 lines 0 comments Download
M tools/telemetry/telemetry/multi_page_benchmark_runner.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +9 lines, -38 lines 0 comments Download
M tools/telemetry/telemetry/multi_page_benchmark_unittest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +23 lines, -1 line 0 comments Download
M tools/telemetry/telemetry/multi_page_benchmark_unittest_base.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M tools/telemetry/telemetry/page_interaction.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -11 lines 0 comments Download
M tools/telemetry/telemetry/page_runner.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +7 lines, -0 lines 0 comments Download
M tools/telemetry/telemetry/page_test.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +43 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
marja
tonyg, could you have a look at this CL? This requires http://codereview.chromium.org/11340037/ to work. And ...
8 years, 1 month ago (2012-10-30 15:14:25 UTC) #1
marja
tonyg: ping, can you have a look at this CL?
8 years, 1 month ago (2012-11-01 01:49:24 UTC) #2
tonyg
A few suggestions inline. I'd really like Nat to review too. http://codereview.chromium.org/11273081/diff/2002/tools/chrome_remote_control/chrome_remote_control/interaction.py File tools/chrome_remote_control/chrome_remote_control/interaction.py (right): ...
8 years, 1 month ago (2012-11-02 18:57:34 UTC) #3
nduca
Can we split this out into two cls, an interaction patch and the memory usage ...
8 years, 1 month ago (2012-11-02 20:38:46 UTC) #4
marja
Thanks for comments! I split out the interaction part of this CL, and it is ...
8 years, 1 month ago (2012-11-05 14:43:25 UTC) #5
marja
http://codereview.chromium.org/11273081/diff/7001/tools/perf/page_sets/top_25_usage.json File tools/perf/page_sets/top_25_usage.json (right): http://codereview.chromium.org/11273081/diff/7001/tools/perf/page_sets/top_25_usage.json#newcode16 tools/perf/page_sets/top_25_usage.json:16: "completion": "window.__ReadyStateComplete()" On 2012/11/05 14:43:25, marja wrote: > On ...
8 years, 1 month ago (2012-11-05 15:14:48 UTC) #6
marja
http://codereview.chromium.org/11273081/diff/7001/tools/perf/page_sets/top_25_usage.json File tools/perf/page_sets/top_25_usage.json (right): http://codereview.chromium.org/11273081/diff/7001/tools/perf/page_sets/top_25_usage.json#newcode16 tools/perf/page_sets/top_25_usage.json:16: "completion": "window.__ReadyStateComplete()" On 2012/11/05 15:14:48, marja wrote: > On ...
8 years, 1 month ago (2012-11-05 15:26:44 UTC) #7
nduca
http://codereview.chromium.org/11273081/diff/16001/tools/perf/perf_tools/memory_benchmark.py File tools/perf/perf_tools/memory_benchmark.py (right): http://codereview.chromium.org/11273081/diff/16001/tools/perf/perf_tools/memory_benchmark.py#newcode32 tools/perf/perf_tools/memory_benchmark.py:32: def DoNextInteraction(self, page, tab): I'd like to see interactions ...
8 years, 1 month ago (2012-11-06 05:10:02 UTC) #8
nduca
https://codereview.chromium.org/11273081/diff/16001/tools/perf/perf_tools/memory_benchmark.py File tools/perf/perf_tools/memory_benchmark.py (right): https://codereview.chromium.org/11273081/diff/16001/tools/perf/perf_tools/memory_benchmark.py#newcode30 tools/perf/perf_tools/memory_benchmark.py:30: options.extra_browser_args.append('--dom-automation') is this flag considered to be long-term supported? ...
8 years, 1 month ago (2012-11-08 22:05:45 UTC) #9
marja
Hi again nduca@, I said I'd to the scroll refactoring next, but I happened to ...
8 years, 1 month ago (2012-11-09 14:17:35 UTC) #10
nduca
I think you have a rebase issue... you've got stuff in this patch that doesn't ...
8 years, 1 month ago (2012-11-09 19:10:08 UTC) #11
nduca
Oops, I misread the patch. Now I get it. But, I think you need to ...
8 years, 1 month ago (2012-11-09 19:39:06 UTC) #12
marja
Hi, Thanks for comments again! Here is a new version.. I also noticed a problem: ...
8 years, 1 month ago (2012-11-12 12:23:31 UTC) #13
nduca
I'd really like to see this moved up one level, to page_runner. Think of it ...
8 years, 1 month ago (2012-11-12 20:58:12 UTC) #14
marja
Thanks for comments; this one I didn't quite understand... http://codereview.chromium.org/11273081/diff/21009/tools/perf/perf_tools/memory_benchmark.py File tools/perf/perf_tools/memory_benchmark.py (right): http://codereview.chromium.org/11273081/diff/21009/tools/perf/perf_tools/memory_benchmark.py#newcode28 tools/perf/perf_tools/memory_benchmark.py:28: ...
8 years, 1 month ago (2012-11-12 21:35:25 UTC) #15
nduca
maybe PageTest.__init__(interaction_to_run)?
8 years, 1 month ago (2012-11-12 22:55:43 UTC) #16
marja
Thanks for comments again! http://codereview.chromium.org/11273081/diff/21009/tools/perf/perf_tools/memory_benchmark.py File tools/perf/perf_tools/memory_benchmark.py (right): http://codereview.chromium.org/11273081/diff/21009/tools/perf/perf_tools/memory_benchmark.py#newcode28 tools/perf/perf_tools/memory_benchmark.py:28: def GetInteractionName(self): On 2012/11/12 21:35:26, ...
8 years, 1 month ago (2012-11-13 09:47:40 UTC) #17
nduca
This looks really promising. One more round I hope and i'll be down to nitting ...
8 years, 1 month ago (2012-11-14 06:48:31 UTC) #18
nduca
http://codereview.chromium.org/11273081/diff/17013/tools/telemetry/telemetry/page_test.py File tools/telemetry/telemetry/page_test.py (right): http://codereview.chromium.org/11273081/diff/17013/tools/telemetry/telemetry/page_test.py#newcode71 tools/telemetry/telemetry/page_test.py:71: self.DidRunInteraction(page, tab) should we return here?
8 years, 1 month ago (2012-11-14 08:36:53 UTC) #19
nduca
http://codereview.chromium.org/11273081/diff/10012/tools/telemetry/telemetry/page_runner.py File tools/telemetry/telemetry/page_runner.py (right): http://codereview.chromium.org/11273081/diff/10012/tools/telemetry/telemetry/page_runner.py#newcode79 tools/telemetry/telemetry/page_runner.py:79: interaction = test.GetInteraction(page) test.interaction <-- use a @property decorator ...
8 years, 1 month ago (2012-11-14 09:50:18 UTC) #20
nduca
http://codereview.chromium.org/11273081/diff/10012/tools/telemetry/telemetry/all_page_interactions.py File tools/telemetry/telemetry/all_page_interactions.py (right): http://codereview.chromium.org/11273081/diff/10012/tools/telemetry/telemetry/all_page_interactions.py#newcode9 tools/telemetry/telemetry/all_page_interactions.py:9: discover.Discover(os.path.dirname(__file__), page_interaction.PageInteraction) doesn't discover return all the class names ...
8 years, 1 month ago (2012-11-14 10:02:40 UTC) #21
marja
Thanks again for comments! I noticed that the discovery is quite ugly. It basically imports ...
8 years, 1 month ago (2012-11-14 13:16:56 UTC) #22
tonyg
https://codereview.chromium.org/11273081/diff/10015/tools/telemetry/telemetry/compound_interaction_unittest.py File tools/telemetry/telemetry/compound_interaction_unittest.py (right): https://codereview.chromium.org/11273081/diff/10015/tools/telemetry/telemetry/compound_interaction_unittest.py#newcode26 tools/telemetry/telemetry/compound_interaction_unittest.py:26: from telemetry import all_page_interactions Can this go at the ...
8 years, 1 month ago (2012-11-14 22:02:53 UTC) #23
nduca
You're not gonna believe it @marja! LGTM [with tonyg's and my minor nit addressed]. Beautiful ...
8 years, 1 month ago (2012-11-15 06:28:15 UTC) #24
marja
8 years, 1 month ago (2012-11-15 12:55:02 UTC) #25
Yay! Thanks for review!

https://codereview.chromium.org/11273081/diff/10015/tools/telemetry/telemetry...
File tools/telemetry/telemetry/compound_interaction_unittest.py (right):

https://codereview.chromium.org/11273081/diff/10015/tools/telemetry/telemetry...
tools/telemetry/telemetry/compound_interaction_unittest.py:26: from telemetry
import all_page_interactions
On 2012/11/14 22:02:53, tonyg wrote:
> Can this go at the top?

Done; it works because the interactions are imported so selectively.

https://codereview.chromium.org/11273081/diff/10015/tools/telemetry/telemetry...
File tools/telemetry/telemetry/multi_page_benchmark_runner.py (right):

https://codereview.chromium.org/11273081/diff/10015/tools/telemetry/telemetry...
tools/telemetry/telemetry/multi_page_benchmark_runner.py:24: benchmarks =
discover.Discover(benchmark_dir, 'benchmark',
On 2012/11/14 22:02:53, tonyg wrote:
> Currently, it isn't true that all benchmarks end in _benchmark.py. Renaming
them
> at this point would break the automated tests running on the bots. Would it be
> easier to just have suffix be optional and not pass it here?

Done; passing an empty suffix here. This will result in importing all the files,
incl. test files here, and we might want to do something about it later. (But
this was the situation before this CL too.)

https://codereview.chromium.org/11273081/diff/10015/tools/telemetry/telemetry...
File tools/telemetry/telemetry/page_runner.py (right):

https://codereview.chromium.org/11273081/diff/10015/tools/telemetry/telemetry...
tools/telemetry/telemetry/page_runner.py:79: interaction =
test.GetInteraction(page)
On 2012/11/15 06:28:15, nduca wrote:
> Can this just be test.CustomizeBrowserOptionsForPage(page) and we keep the
> interaction inside the page? I'm sure that I told you differently in a
previous
> review, but now that I see it like this, I notice that other than here,
> interactions are sealed inside page_test.

Done; makes very much sense, and I indeed wanted it to be like that :) Happy to
see that our design ideas converge in the end :)

Because this func was so generic (get the interaction and let it customize the
options), I added it to PageTest.

Powered by Google App Engine
This is Rietveld 408576698