summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authortonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-15 20:16:08 +0000
committertonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-15 20:16:08 +0000
commit830356bc02ecd0a263d40240859983312d9ab0f5 (patch)
tree4e4bf77f4ba70674ddcdfab3239e9dd3d04856d5 /tools
parent61ae6bed3426e129f7e486c6d10d975de531b2f8 (diff)
downloadchromium_src-830356bc02ecd0a263d40240859983312d9ab0f5.zip
chromium_src-830356bc02ecd0a263d40240859983312d9ab0f5.tar.gz
chromium_src-830356bc02ecd0a263d40240859983312d9ab0f5.tar.bz2
[Telemetry] Make page cyclers more telemetric.
This causes the page cyclers to use page_sets instead of just navigating to the start page and letting the pages cycle themselves. This means we'll be using Telemetry "properly" which will allow us to record new page sets to update the page cyclers and it means that page cycler page sets are interchangeable with other benchmarks. The page cyclers still measure the same thing as they measured previously: the time to load the page and perform a layout. However, they measure it differently now. Instead of setting a new Date().getTime() in the cookie immediately before navigating and then grabbing the finish Date in the onload handler, this now just grabs performance.now() in the onload handler. This returns the number of milliseconds since navigationStart where navigation start is the same as the immediately before navigation time marked before. I've verified locally that the times reported are consistent, and will monitor the bots to verify. This involved moving the serving_dirs property up from the page to the page_set. BUG=None TEST=All page cyclers on linux and morejs on windows NOTRY=True Review URL: https://codereview.chromium.org/13817009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/page_sets/page_cycler/alexa_us.json26
-rw-r--r--tools/perf/page_sets/page_cycler/bloat.json7
-rw-r--r--tools/perf/page_sets/page_cycler/dhtml.json23
-rw-r--r--tools/perf/page_sets/page_cycler/dom.json15
-rw-r--r--tools/perf/page_sets/page_cycler/indexed_db/basic_insert.json8
-rw-r--r--tools/perf/page_sets/page_cycler/intl1.json62
-rw-r--r--tools/perf/page_sets/page_cycler/intl2.json36
-rw-r--r--tools/perf/page_sets/page_cycler/morejs.json15
-rw-r--r--tools/perf/page_sets/page_cycler/morejsnp.json15
-rw-r--r--tools/perf/page_sets/page_cycler/moz.json47
-rw-r--r--tools/perf/page_sets/page_cycler/moz2.json47
-rw-r--r--tools/perf/perf_tools/page_cycler.js60
-rw-r--r--tools/perf/perf_tools/page_cycler.py211
-rw-r--r--tools/telemetry/telemetry/page/page.py6
-rw-r--r--tools/telemetry/telemetry/page/page_benchmark_results.py2
-rw-r--r--tools/telemetry/telemetry/page/page_unittest.py13
16 files changed, 446 insertions, 147 deletions
diff --git a/tools/perf/page_sets/page_cycler/alexa_us.json b/tools/perf/page_sets/page_cycler/alexa_us.json
index 06bc5a7..106866a 100644
--- a/tools/perf/page_sets/page_cycler/alexa_us.json
+++ b/tools/perf/page_sets/page_cycler/alexa_us.json
@@ -1,10 +1,26 @@
{
"description": "Alexa US page_cycler benchmark",
+ "serving_dirs": ["../../../../data/page_cycler/alexa_us"],
"pages": [
- {
- "url": "file:///../../../../data/page_cycler/alexa_us/start.html?iterations=10&auto=1",
- "serving_dirs": ["../../../../data/page_cycler/common",
- "../../../../data/page_cycler/alexa_us"]
- }
+ { "url": "file:///../../../../data/page_cycler/alexa_us/accountservices.passport.net/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/sfbay.craigslist.org/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.amazon.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.aol.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.bbc.co.uk/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.blogger.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.cnn.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.ebay.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.flickr.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.friendster.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.go.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.google.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.imdb.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.megaupload.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.msn.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.myspace.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.orkut.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.wikipedia.org/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.xanga.com/" },
+ { "url": "file:///../../../../data/page_cycler/alexa_us/www.youtube.com/" }
]
}
diff --git a/tools/perf/page_sets/page_cycler/bloat.json b/tools/perf/page_sets/page_cycler/bloat.json
index a633b70..a42ce32 100644
--- a/tools/perf/page_sets/page_cycler/bloat.json
+++ b/tools/perf/page_sets/page_cycler/bloat.json
@@ -1,10 +1,7 @@
{
"description": "Bloat page_cycler benchmark",
+ "serving_dirs": ["../../../../data/page_cycler/bloat"],
"pages": [
- {
- "url": "file:///../../../../data/page_cycler/bloat/start.html?iterations=10&auto=1",
- "serving_dirs": ["../../../../data/page_cycler/common",
- "../../../../data/page_cycler/bloat"]
- }
+ { "url": "file:///../../../../data/page_cycler/bloat/gmail_load_cleardot/" }
]
}
diff --git a/tools/perf/page_sets/page_cycler/dhtml.json b/tools/perf/page_sets/page_cycler/dhtml.json
index 7355220..04e91e9 100644
--- a/tools/perf/page_sets/page_cycler/dhtml.json
+++ b/tools/perf/page_sets/page_cycler/dhtml.json
@@ -1,10 +1,23 @@
{
"description": "DHTML page_cycler benchmark",
+ "serving_dirs": ["../../../../data/page_cycler/dhtml"],
"pages": [
- {
- "url": "file:///../../../../data/page_cycler/dhtml/start.html?iterations=10&auto=1",
- "serving_dirs": ["../../../../data/page_cycler/common",
- "../../../../data/page_cycler/dhtml"]
- }
+ { "url": "file:///../../../../data/page_cycler/dhtml/colorfade/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/diagball/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/fadespacing/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/imageslide/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/layers1/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/layers2/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/layers4/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/layers5/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/layers6/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/meter/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/movingtext/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/mozilla/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/replaceimages/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/scrolling/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/slidein/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/slidingballs/" },
+ { "url": "file:///../../../../data/page_cycler/dhtml/zoom/" }
]
}
diff --git a/tools/perf/page_sets/page_cycler/dom.json b/tools/perf/page_sets/page_cycler/dom.json
index 58f3c9e..e2cb750 100644
--- a/tools/perf/page_sets/page_cycler/dom.json
+++ b/tools/perf/page_sets/page_cycler/dom.json
@@ -1,10 +1,15 @@
{
"description": "DOM page_cycler benchmark",
+ "serving_dirs": ["../../../../data/page_cycler/dom"],
"pages": [
- {
- "url": "file:///../../../../data/page_cycler/dom/start.html?iterations=10&auto=1",
- "serving_dirs": ["../../../../data/page_cycler/common",
- "../../../../data/page_cycler/dom"]
- }
+ { "url": "file:///../../../../data/page_cycler/dom/HTMLDocument_write/" },
+ { "url": "file:///../../../../data/page_cycler/dom/Document_getElementById/" },
+ { "url": "file:///../../../../data/page_cycler/dom/DOMWindow_document/" },
+ { "url": "file:///../../../../data/page_cycler/dom/DOMWindow_window/" },
+ { "url": "file:///../../../../data/page_cycler/dom/Element_getAttribute/" },
+ { "url": "file:///../../../../data/page_cycler/dom/HTMLCollection_length/" },
+ { "url": "file:///../../../../data/page_cycler/dom/HTMLElement_className/" },
+ { "url": "file:///../../../../data/page_cycler/dom/HTMLElement_id/" },
+ { "url": "file:///../../../../data/page_cycler/dom/NodeList_length/" }
]
}
diff --git a/tools/perf/page_sets/page_cycler/indexed_db/basic_insert.json b/tools/perf/page_sets/page_cycler/indexed_db/basic_insert.json
index 7e64e5e..f7caf72 100644
--- a/tools/perf/page_sets/page_cycler/indexed_db/basic_insert.json
+++ b/tools/perf/page_sets/page_cycler/indexed_db/basic_insert.json
@@ -1,10 +1,8 @@
{
"description": "Basic insert IndexedDB page_cycler benchmark",
+ "serving_dirs": ["../../../../../tools/page_cycler/indexed_db/basic_insert",
+ "../../../../../tools/page_cycler/indexed_db/common.js"],
"pages": [
- {
- "url": "file:///../../../../../tools/page_cycler/indexed_db/basic_insert/start.html?iterations=5&auto=1",
- "serving_dirs": ["../../../../../tools/page_cycler/common",
- "../../../../../tools/page_cycler/indexed_db"]
- }
+ { "url": "file:///../../../../../tools/page_cycler/indexed_db/basic_insert/" }
]
}
diff --git a/tools/perf/page_sets/page_cycler/intl1.json b/tools/perf/page_sets/page_cycler/intl1.json
index 1b25597..97c206e 100644
--- a/tools/perf/page_sets/page_cycler/intl1.json
+++ b/tools/perf/page_sets/page_cycler/intl1.json
@@ -1,10 +1,62 @@
{
"description": "Intl1 page_cycler benchmark",
+ "serving_dirs": ["../../../../data/page_cycler/intl1"],
"pages": [
- {
- "url": "file:///../../../../data/page_cycler/intl1/start.html?iterations=10&auto=1",
- "serving_dirs": ["../../../../data/page_cycler/common",
- "../../../../data/page_cycler/intl1"]
- }
+ { "url": "file:///../../../../data/page_cycler/intl1/126.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/2ch.net/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/6park.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/affili.net/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/allegro.pl/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/apeha.ru/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/baidu.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/bbs.wefong.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/blog.skyrock.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/cmfu.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/cn.yahoo.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/contra.gr/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/dtiblog.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/el.wikipedia.org/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/elmundo.es/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/ettoday.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/exblog.jp/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/excite.co.jp/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/fc2.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/fora.pl/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/free.fr/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/golem.de/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/goo.ne.jp/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/haberturk.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/hatena.ne.jp/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/home.altervista.org/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/hurriyet.com.tr/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/jugem.jp/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/kakaku.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/mixi.jp/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/naftemporiki.gr/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/narod.yandex.ru/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/news.163.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/partyflock.nl/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/pchome.com.tw/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/phoenixtv.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/photofile.ru/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/pl.wikipedia.org/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/ricardo.ch/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/ru.wikipedia.org/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/ruten.com.tw/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/sport24.gr/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/terra.es/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/udn.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/uwants.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/voila.fr/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/www.alice.it/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/www.amazon.co.jp/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/www.auction.co.kr/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/www.chinaren.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/www.chosun.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/www.danawa.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/www.daum.net/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/www.dcinside.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/www.eastmoney.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl1/zol.com.cn/" }
]
}
diff --git a/tools/perf/page_sets/page_cycler/intl2.json b/tools/perf/page_sets/page_cycler/intl2.json
index ceb899a..b3520b7 100644
--- a/tools/perf/page_sets/page_cycler/intl2.json
+++ b/tools/perf/page_sets/page_cycler/intl2.json
@@ -1,10 +1,36 @@
{
"description": "Intl2 page_cycler benchmark",
+ "serving_dirs": ["../../../../data/page_cycler/intl2"],
"pages": [
- {
- "url": "file:///../../../../data/page_cycler/intl2/start.html?iterations=10&auto=1",
- "serving_dirs": ["../../../../data/page_cycler/common",
- "../../../../data/page_cycler/intl2"]
- }
+ { "url": "file:///../../../../data/page_cycler/intl2/arabicnews.google.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/bn.wikipedia.org/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/exteen.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/farsnews.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/hindi.webdunia.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/in.telugu.yahoo.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/isna.ir/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/kapook.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/kooora.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/manager.co.th/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/masrawy.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/ml.wikipedia.org/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/msn.co.il/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/news.bbc.co.uk/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/news.google.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/sh3bwah.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/sgkalesh.blogspot.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/tapuz.co.il/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/thaimisc.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/vietnamnet.vn/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/vnexpress.net/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/walla.co.il/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/www.aljayyash.net/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/www.bbc.co.uk/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/www.google.com.sa/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/www.islamweb.net/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/www.mthai.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/www.startimes2.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/www.jagran.com/" },
+ { "url": "file:///../../../../data/page_cycler/intl2/ynet.co.il/" }
]
}
diff --git a/tools/perf/page_sets/page_cycler/morejs.json b/tools/perf/page_sets/page_cycler/morejs.json
index bd5f497..bb8db89 100644
--- a/tools/perf/page_sets/page_cycler/morejs.json
+++ b/tools/perf/page_sets/page_cycler/morejs.json
@@ -1,10 +1,15 @@
{
"description": "More JS page_cycler benchmark",
+ "serving_dirs": ["../../../../data/page_cycler/morejs"],
"pages": [
- {
- "url": "file:///../../../../data/page_cycler/morejs/start.html?iterations=10&auto=1",
- "serving_dirs": ["../../../../data/page_cycler/common",
- "../../../../data/page_cycler/morejs"]
- }
+ { "url": "file:///../../../../data/page_cycler/morejs/blog.chromium.org/" },
+ { "url": "file:///../../../../data/page_cycler/morejs/dev.chromium.org/" },
+ { "url": "file:///../../../../data/page_cycler/morejs/googleblog.blogspot.com1/" },
+ { "url": "file:///../../../../data/page_cycler/morejs/googleblog.blogspot.com2/" },
+ { "url": "file:///../../../../data/page_cycler/morejs/test.blogspot.com/" },
+ { "url": "file:///../../../../data/page_cycler/morejs/www.igoogle.com/" },
+ { "url": "file:///../../../../data/page_cycler/morejs/www.techcrunch.com/" },
+ { "url": "file:///../../../../data/page_cycler/morejs/www.webkit.org/" },
+ { "url": "file:///../../../../data/page_cycler/morejs/www.yahoo.com/" }
]
}
diff --git a/tools/perf/page_sets/page_cycler/morejsnp.json b/tools/perf/page_sets/page_cycler/morejsnp.json
index ac560e1..926590a 100644
--- a/tools/perf/page_sets/page_cycler/morejsnp.json
+++ b/tools/perf/page_sets/page_cycler/morejsnp.json
@@ -1,10 +1,15 @@
{
"description": "Morejsnp page_cycler benchmark",
+ "serving_dirs": ["../../../../data/page_cycler/morejsnp"],
"pages": [
- {
- "url": "file:///../../../../data/page_cycler/morejsnp/start.html?iterations=10&auto=1",
- "serving_dirs": ["../../../../data/page_cycler/common",
- "../../../../data/page_cycler/morejsnp"]
- }
+ { "url": "file:///../../../../data/page_cycler/morejsnp/blog.chromium.org/" },
+ { "url": "file:///../../../../data/page_cycler/morejsnp/dev.chromium.org/" },
+ { "url": "file:///../../../../data/page_cycler/morejsnp/googleblog.blogspot.com1/" },
+ { "url": "file:///../../../../data/page_cycler/morejsnp/googleblog.blogspot.com2/" },
+ { "url": "file:///../../../../data/page_cycler/morejsnp/test.blogspot.com/" },
+ { "url": "file:///../../../../data/page_cycler/morejsnp/www.igoogle.com/" },
+ { "url": "file:///../../../../data/page_cycler/morejsnp/www.techcrunch.com/" },
+ { "url": "file:///../../../../data/page_cycler/morejsnp/www.webkit.org/" },
+ { "url": "file:///../../../../data/page_cycler/morejsnp/www.yahoo.com/" }
]
}
diff --git a/tools/perf/page_sets/page_cycler/moz.json b/tools/perf/page_sets/page_cycler/moz.json
index b42e853..ed6b172 100644
--- a/tools/perf/page_sets/page_cycler/moz.json
+++ b/tools/perf/page_sets/page_cycler/moz.json
@@ -1,10 +1,47 @@
{
"description": "Moz page_cycler benchmark",
+ "serving_dirs": ["../../../../data/page_cycler/moz"],
"pages": [
- {
- "url": "file:///../../../../data/page_cycler/moz/start.html?iterations=10&auto=1",
- "serving_dirs": ["../../../../data/page_cycler/common",
- "../../../../data/page_cycler/moz"]
- }
+ { "url": "file:///../../../../data/page_cycler/moz/bugzilla.mozilla.org/" },
+ { "url": "file:///../../../../data/page_cycler/moz/espn.go.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/home.netscape.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/hotwired.lycos.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/lxr.mozilla.org/" },
+ { "url": "file:///../../../../data/page_cycler/moz/my.netscape.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/news.cnet.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/slashdot.org/" },
+ { "url": "file:///../../../../data/page_cycler/moz/vanilla-page/" },
+ { "url": "file:///../../../../data/page_cycler/moz/web.icq.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.altavista.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.amazon.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.aol.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.apple.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.cnn.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.compuserve.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.digitalcity.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.ebay.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.excite.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.expedia.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.google.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.iplanet.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.mapquest.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.microsoft.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.moviefone.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.msn.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.msnbc.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.nytimes.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.nytimes.com_Table/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.quicken.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.spinner.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.sun.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.time.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.tomshardware.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.travelocity.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.voodooextreme.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.w3.org_DOML2Core/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.wired.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.yahoo.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.zdnet.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz/www.zdnet.com_Gamespot.com/" }
]
}
diff --git a/tools/perf/page_sets/page_cycler/moz2.json b/tools/perf/page_sets/page_cycler/moz2.json
index 477cb9d..fd1e6ec 100644
--- a/tools/perf/page_sets/page_cycler/moz2.json
+++ b/tools/perf/page_sets/page_cycler/moz2.json
@@ -1,10 +1,47 @@
{
"description": "Moz2 page_cycler benchmark",
+ "serving_dirs": ["../../../../data/page_cycler/moz2"],
"pages": [
- {
- "url": "file:///../../../../data/page_cycler/moz2/start.html?iterations=10&auto=1",
- "serving_dirs": ["../../../../data/page_cycler/common",
- "../../../../data/page_cycler/moz2"]
- }
+ { "url": "file:///../../../../data/page_cycler/moz2/bugzilla.mozilla.org/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/espn.go.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/home.netscape.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/hotwired.lycos.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/lxr.mozilla.org/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/my.netscape.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/news.cnet.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/slashdot.org/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/vanilla-page/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/web.icq.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.altavista.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.amazon.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.aol.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.apple.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.cnn.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.compuserve.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.digitalcity.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.ebay.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.excite.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.expedia.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.google.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.iplanet.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.mapquest.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.microsoft.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.moviefone.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.msn.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.msnbc.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.nytimes.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.nytimes.com_Table/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.quicken.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.spinner.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.sun.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.time.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.tomshardware.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.travelocity.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.voodooextreme.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.w3.org_DOML2Core/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.wired.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.yahoo.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.zdnet.com/" },
+ { "url": "file:///../../../../data/page_cycler/moz2/www.zdnet.com_Gamespot.com/" }
]
}
diff --git a/tools/perf/perf_tools/page_cycler.js b/tools/perf/perf_tools/page_cycler.js
new file mode 100644
index 0000000..b364146
--- /dev/null
+++ b/tools/perf/perf_tools/page_cycler.js
@@ -0,0 +1,60 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function() {
+// The Mozilla DHTML performance tests need to explicitly call a function to
+// trigger the next page visit, rather than directly using the onload handler.
+// To meet needs of the DHTML performance tests without forking this head.js
+// file, use a variable |__install_onload_handler| to indicate whether the
+// |__onload| handler should be added to onload event listener.
+// Install |__onload| by default if there is no pre-configuration.
+if (typeof(__install_onload_handler) == 'undefined')
+ var __install_onload_handler = true;
+
+// This is the timeout used in setTimeout inside the DHTML tests. Chrome has
+// a much more accurate timer resolution than other browsers do. This results
+// in Chrome running these tests much faster than other browsers. In order to
+// compare Chrome with other browsers on DHTML performance alone, set this
+// value to ~15.
+var __test_timeout = 0;
+
+function __set_cookie(name, value) {
+ document.cookie = name + "=" + value + "; path=/";
+}
+
+function __onbeforeunload() {
+ // Call GC twice to cleanup JS heap before starting a new test.
+ if (window.gc) {
+ window.gc();
+ window.gc();
+ }
+
+ __set_cookie("__pc_load_time", "");
+}
+
+// The function |__onload| is used by the DHTML tests.
+window.__onload = function() {
+ // window.storeCreated is used by the Indexed DB tests.
+ if ((!__install_onload_handler || window.storeCreated) &&
+ !performance.timing.loadEventEnd)
+ return;
+
+ var unused = document.body.offsetHeight; // force layout
+
+ __set_cookie("__pc_load_time", window.performance.now());
+};
+
+// The function |testComplete| is used by the Indexed DB tests.
+window.testComplete = __onload;
+
+// The function |__eval_later| now is only used by the DHTML tests.
+window.__eval_later = function(expression) {
+ setTimeout(expression, __test_timeout);
+};
+
+if (window.parent == window) { // Ignore subframes.
+ addEventListener("load", __onload);
+ addEventListener("beforeunload", __onbeforeunload);
+}
+})();
diff --git a/tools/perf/perf_tools/page_cycler.py b/tools/perf/perf_tools/page_cycler.py
index c5a2b18..c29873e 100644
--- a/tools/perf/perf_tools/page_cycler.py
+++ b/tools/perf/perf_tools/page_cycler.py
@@ -1,6 +1,21 @@
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+
+"""The page cycler benchmark.
+
+This benchmark registers a window load handler in which is forces a layout and
+then records the value of performance.now(). This call to now() measures the
+time from navigationStart (immediately after the previous page's beforeunload
+event) until after the layout in the page's load event. In addition, two garbage
+collections are performed in between the page loads (in the beforeunload event).
+This extra garbage collection time is not included in the benchmark times.
+
+Finally, various memory and IO statistics are gathered at the very end of
+cycling all pages.
+"""
+
+import os
import sys
from perf_tools import histogram_measurement
@@ -13,15 +28,36 @@ MEMORY_HISTOGRAMS = [
{'name': 'V8.MemoryHeapSampleTotalUsed', 'units': 'kb'}]
class PageCycler(page_benchmark.PageBenchmark):
- def WillNavigateToPage(self, page, tab):
+ def AddCommandLineOptions(self, parser):
+ # The page cyclers should default to 10 iterations. In order to change the
+ # default of an option, we must remove and re-add it.
+ pageset_repeat_option = parser.get_option('--pageset-repeat')
+ pageset_repeat_option.default = 10
+ parser.remove_option('--pageset-repeat')
+ parser.add_option(pageset_repeat_option)
+
+ def WillRunPageSet(self, tab, results):
+ # Avoid paying for a cross-renderer navigation on the first page on legacy
+ # page cyclers which use the filesystem.
+ if tab.browser.http_server:
+ tab.Navigate(tab.browser.http_server.UrlOf('nonexistent.html'))
+
+ with open(os.path.join(os.path.dirname(__file__),
+ 'page_cycler.js'), 'r') as f:
+ self.page_cycler_js = f.read() # pylint: disable=W0201
+
# pylint: disable=W0201
self.start_commit_charge = tab.browser.memory_stats['SystemCommitCharge']
- def DidNavigateToPage(self, page, tab):
# pylint: disable=W0201
self.histograms = [histogram_measurement.HistogramMeasurement(
h, histogram_measurement.RENDERER_HISTOGRAM)
for h in MEMORY_HISTOGRAMS]
+
+ def WillNavigateToPage(self, page, tab):
+ page.script_to_evaluate_on_commit = self.page_cycler_js
+
+ def DidNavigateToPage(self, page, tab):
for h in self.histograms:
h.Start(page, tab)
@@ -52,120 +88,127 @@ class PageCycler(page_benchmark.PageBenchmark):
# Browser
if 'VM' in memory['Browser']:
- results.Add('vm_size_f_b', 'bytes', memory['Browser']['VM'],
- chart_name='vm_size_final_b', data_type='unimportant')
+ results.AddSummary('vm_size_f_b', 'bytes', memory['Browser']['VM'],
+ chart_name='vm_size_final_b', data_type='unimportant')
if 'VMPeak' in memory['Browser']:
- results.Add('vm_pk_b', 'bytes', memory['Browser']['VMPeak'],
- chart_name='vm_peak_b', data_type='unimportant')
+ results.AddSummary('vm_pk_b', 'bytes', memory['Browser']['VMPeak'],
+ chart_name='vm_peak_b', data_type='unimportant')
if 'WorkingSetSize' in memory['Browser']:
- results.Add('vm_%s_f_b' % metric, 'bytes',
- memory['Browser']['WorkingSetSize'],
- chart_name='vm_%s_final_b' % metric, data_type='unimportant')
+ results.AddSummary('vm_%s_f_b' % metric, 'bytes',
+ memory['Browser']['WorkingSetSize'],
+ chart_name='vm_%s_final_b' % metric,
+ data_type='unimportant')
if 'WorkingSetSizePeak' in memory['Browser']:
- results.Add('%s_pk_b' % metric, 'bytes',
- memory['Browser']['WorkingSetSizePeak'],
- chart_name='%s_peak_b' % metric, data_type='unimportant')
+ results.AddSummary('%s_pk_b' % metric, 'bytes',
+ memory['Browser']['WorkingSetSizePeak'],
+ chart_name='%s_peak_b' % metric,
+ data_type='unimportant')
if 'PrivateDirty' in memory['Browser']:
- results.Add('vm_private_dirty_f_b', 'bytes',
- memory['Browser']['PrivateDirty'],
- chart_name='vm_private_dirty_final_b',
- data_type='unimportant')
+ results.AddSummary('vm_private_dirty_f_b', 'bytes',
+ memory['Browser']['PrivateDirty'],
+ chart_name='vm_private_dirty_final_b',
+ data_type='unimportant')
if 'ProportionalSetSize' in memory['Browser']:
- results.Add('vm_pss_f_b', 'bytes',
- memory['Browser']['ProportionalSetSize'],
- chart_name='vm_pss_final_b', data_type='unimportant')
+ results.AddSummary('vm_pss_f_b', 'bytes',
+ memory['Browser']['ProportionalSetSize'],
+ chart_name='vm_pss_final_b', data_type='unimportant')
# Renderer
if 'VM' in memory['Renderer']:
- results.Add('vm_size_f_r', 'bytes', memory['Renderer']['VM'],
- chart_name='vm_size_final_r', data_type='unimportant')
+ results.AddSummary('vm_size_f_r', 'bytes', memory['Renderer']['VM'],
+ chart_name='vm_size_final_r', data_type='unimportant')
if 'VMPeak' in memory['Renderer']:
- results.Add('vm_pk_r', 'bytes', memory['Browser']['VMPeak'],
- chart_name='vm_peak_r', data_type='unimportant')
+ results.AddSummary('vm_pk_r', 'bytes', memory['Browser']['VMPeak'],
+ chart_name='vm_peak_r', data_type='unimportant')
if 'WorkingSetSize' in memory['Renderer']:
- results.Add('vm_%s_f_r' % metric, 'bytes',
- memory['Renderer']['WorkingSetSize'],
- chart_name='vm_%s_final_r' % metric, data_type='unimportant')
+ results.AddSummary('vm_%s_f_r' % metric, 'bytes',
+ memory['Renderer']['WorkingSetSize'],
+ chart_name='vm_%s_final_r' % metric,
+ data_type='unimportant')
if 'WorkingSetSizePeak' in memory['Renderer']:
- results.Add('%s_pk_r' % metric, 'bytes',
- memory['Browser']['WorkingSetSizePeak'],
- chart_name='%s_peak_r' % metric, data_type='unimportant')
+ results.AddSummary('%s_pk_r' % metric, 'bytes',
+ memory['Browser']['WorkingSetSizePeak'],
+ chart_name='%s_peak_r' % metric,
+ data_type='unimportant')
if 'PrivateDirty' in memory['Renderer']:
- results.Add('vm_private_dirty_f_r', 'bytes',
- memory['Renderer']['PrivateDirty'],
- chart_name='vm_private_dirty_final_r',
- data_type='unimportant')
+ results.AddSummary('vm_private_dirty_f_r', 'bytes',
+ memory['Renderer']['PrivateDirty'],
+ chart_name='vm_private_dirty_final_r',
+ data_type='unimportant')
if 'ProportionalSetSize' in memory['Renderer']:
- results.Add('vm_pss_f_r', 'bytes',
- memory['Renderer']['ProportionalSetSize'],
- chart_name='vm_pss_final_r', data_type='unimportant')
+ results.AddSummary('vm_pss_f_r', 'bytes',
+ memory['Renderer']['ProportionalSetSize'],
+ chart_name='vm_pss_final_r', data_type='unimportant')
# Total
if 'VM' in memory['Browser'] and 'VM' in memory['Renderer']:
- results.Add('vm_size_f_t', 'bytes',
- memory['Browser']['VM'] + memory['Renderer']['VM'],
- chart_name='vm_size_final_t', data_type='unimportant')
+ results.AddSummary('vm_size_f_t', 'bytes',
+ memory['Browser']['VM'] + memory['Renderer']['VM'],
+ chart_name='vm_size_final_t', data_type='unimportant')
if ('WorkingSetSize' in memory['Browser'] and
'WorkingSetSize' in memory['Renderer']):
- results.Add('vm_%s_f_t' % metric, 'bytes',
- memory['Browser']['WorkingSetSize'] +
- memory['Renderer']['WorkingSetSize'],
- chart_name='vm_%s_final_t' % metric, data_type='unimportant')
+ results.AddSummary('vm_%s_f_t' % metric, 'bytes',
+ memory['Browser']['WorkingSetSize'] +
+ memory['Renderer']['WorkingSetSize'],
+ chart_name='vm_%s_final_t' % metric,
+ data_type='unimportant')
if ('PrivateDirty' in memory['Browser'] and
'PrivateDirty' in memory['Renderer']):
- results.Add('vm_private_dirty_f_t', 'bytes',
- memory['Browser']['PrivateDirty'] +
- memory['Renderer']['PrivateDirty'],
- chart_name='vm_private_dirty_final_t',
- data_type='unimportant')
+ results.AddSummary('vm_private_dirty_f_t', 'bytes',
+ memory['Browser']['PrivateDirty'] +
+ memory['Renderer']['PrivateDirty'],
+ chart_name='vm_private_dirty_final_t',
+ data_type='unimportant')
if ('ProportionalSetSize' in memory['Browser'] and
'ProportionalSetSize' in memory['Renderer']):
- results.Add('vm_pss_f_t', 'bytes',
- memory['Browser']['ProportionalSetSize'] +
- memory['Renderer']['ProportionalSetSize'],
- chart_name='vm_pss_final_t', data_type='unimportant')
+ results.AddSummary('vm_pss_f_t', 'bytes',
+ memory['Browser']['ProportionalSetSize'] +
+ memory['Renderer']['ProportionalSetSize'],
+ chart_name='vm_pss_final_t', data_type='unimportant')
- results.Add('cc', 'kb',
- memory['SystemCommitCharge'] - self.start_commit_charge,
- chart_name='commit_charge', data_type='unimportant')
- results.Add('proc_', 'count', memory['ProcessCount'],
- chart_name='processes', data_type='unimportant')
+ results.AddSummary('cc', 'kb',
+ memory['SystemCommitCharge'] - self.start_commit_charge,
+ chart_name='commit_charge', data_type='unimportant')
+ results.AddSummary('proc_', 'count', memory['ProcessCount'],
+ chart_name='processes', data_type='unimportant')
def MeasureIO(self, tab, results):
io_stats = tab.browser.io_stats
if not io_stats['Browser']:
return
- results.Add('r_op_b', '', io_stats['Browser']['ReadOperationCount'],
- chart_name='read_op_b', data_type='unimportant')
- results.Add('w_op_b', '', io_stats['Browser']['WriteOperationCount'],
- chart_name='write_op_b', data_type='unimportant')
- results.Add('r_b', 'kb', io_stats['Browser']['ReadTransferCount'] / 1024,
- chart_name='read_byte_b', data_type='unimportant')
- results.Add('w_b', 'kb', io_stats['Browser']['WriteTransferCount'] / 1024,
- chart_name='write_byte_b', data_type='unimportant')
- results.Add('r_op_r', '', io_stats['Renderer']['ReadOperationCount'],
- chart_name='read_op_r', data_type='unimportant')
- results.Add('w_op_r', '', io_stats['Renderer']['WriteOperationCount'],
- chart_name='write_op_r', data_type='unimportant')
- results.Add('r_r', 'kb', io_stats['Renderer']['ReadTransferCount'] / 1024,
- chart_name='read_byte_r', data_type='unimportant')
- results.Add('w_r', 'kb', io_stats['Renderer']['WriteTransferCount'] / 1024,
- chart_name='write_byte_r', data_type='unimportant')
+ results.AddSummary('r_op_b', '', io_stats['Browser']['ReadOperationCount'],
+ chart_name='read_op_b', data_type='unimportant')
+ results.AddSummary('w_op_b', '', io_stats['Browser']['WriteOperationCount'],
+ chart_name='write_op_b', data_type='unimportant')
+ results.AddSummary('r_b', 'kb',
+ io_stats['Browser']['ReadTransferCount'] / 1024,
+ chart_name='read_byte_b', data_type='unimportant')
+ results.AddSummary('w_b', 'kb',
+ io_stats['Browser']['WriteTransferCount'] / 1024,
+ chart_name='write_byte_b', data_type='unimportant')
+ results.AddSummary('r_op_r', '', io_stats['Renderer']['ReadOperationCount'],
+ chart_name='read_op_r', data_type='unimportant')
+ results.AddSummary('w_op_r', '',
+ io_stats['Renderer']['WriteOperationCount'],
+ chart_name='write_op_r', data_type='unimportant')
+ results.AddSummary('r_r', 'kb',
+ io_stats['Renderer']['ReadTransferCount'] / 1024,
+ chart_name='read_byte_r', data_type='unimportant')
+ results.AddSummary('w_r', 'kb',
+ io_stats['Renderer']['WriteTransferCount'] / 1024,
+ chart_name='write_byte_r', data_type='unimportant')
def MeasurePage(self, page, tab, results):
def _IsDone():
- return tab.GetCookieByName('__pc_done') == '1'
- util.WaitFor(_IsDone, 1200, poll_interval=5)
- print 'Pages: [%s]' % tab.GetCookieByName('__pc_pages')
-
- self.MeasureMemory(tab, results)
- self.MeasureIO(tab, results)
+ return bool(tab.GetCookieByName('__pc_load_time'))
+ util.WaitFor(_IsDone, 1200)
for h in self.histograms:
h.GetValue(page, tab, results)
- def _IsNavigatedToReport():
- return tab.GetCookieByName('__navigated_to_report') == '1'
- util.WaitFor(_IsNavigatedToReport, 60, poll_interval=5)
- timings = tab.EvaluateJavaScript('__get_timings()').split(',')
- results.Add('t', 'ms', [int(t) for t in timings], chart_name='times')
+ results.Add('t', 'ms', int(float(tab.GetCookieByName('__pc_load_time'))),
+ chart_name='times')
+
+ def DidRunPageSet(self, tab, results):
+ self.MeasureMemory(tab, results)
+ self.MeasureIO(tab, results)
diff --git a/tools/telemetry/telemetry/page/page.py b/tools/telemetry/telemetry/page/page.py
index d7b075c..1ec09e0 100644
--- a/tools/telemetry/telemetry/page/page.py
+++ b/tools/telemetry/telemetry/page/page.py
@@ -51,10 +51,10 @@ class Page(object):
path = self.base_dir + parsed_url.netloc + parsed_url.path
- if hasattr(self, 'serving_dirs'):
- url_base_dir = os.path.commonprefix(self.serving_dirs)
+ if hasattr(self.page_set, 'serving_dirs'):
+ url_base_dir = os.path.commonprefix(self.page_set.serving_dirs)
base_path = self.base_dir + '/' + url_base_dir
- return ([self.base_dir + '/' + d for d in self.serving_dirs],
+ return ([self.base_dir + '/' + d for d in self.page_set.serving_dirs],
path.replace(base_path, ''))
return os.path.split(path)
diff --git a/tools/telemetry/telemetry/page/page_benchmark_results.py b/tools/telemetry/telemetry/page/page_benchmark_results.py
index b13e2b9..32eab68 100644
--- a/tools/telemetry/telemetry/page/page_benchmark_results.py
+++ b/tools/telemetry/telemetry/page/page_benchmark_results.py
@@ -123,12 +123,14 @@ class PageBenchmarkResults(page_test.PageTestResults):
if self.page_failures:
return
+ # Print out the list of unique pages.
unique_page_urls = []
for page_values in self._page_results:
url = page_values.page.display_url
if unique_page_urls and unique_page_urls[0] == url:
break
unique_page_urls.append(url)
+ print 'Pages: [%s]' % ','.join(unique_page_urls)
# Build the results summary.
results_summary = defaultdict(list)
diff --git a/tools/telemetry/telemetry/page/page_unittest.py b/tools/telemetry/telemetry/page/page_unittest.py
index a7b0f9a..9ef41ac 100644
--- a/tools/telemetry/telemetry/page/page_unittest.py
+++ b/tools/telemetry/telemetry/page/page_unittest.py
@@ -25,11 +25,14 @@ class TestPage(unittest.TestCase):
self.assertEqual(filename, 'file.html')
def testGetUrlBaseDirAndFileForUrlBaseDir(self):
- apage = page.Page('file:///../../somedir/otherdir/file.html',
- None, # In this test, we don't need a page set.
- base_dir='basedir')
- setattr(apage, 'serving_dirs', ['../../somedir/'])
- serving_dirs, filename = apage.serving_dirs_and_file
+ ps = page_set.PageSet.FromDict({
+ 'description': 'hello',
+ 'archive_path': 'foo.wpr',
+ 'serving_dirs': ['../../somedir/'],
+ 'pages': [
+ {'url': 'file:///../../somedir/otherdir/file.html'}
+ ]}, 'basedir/')
+ serving_dirs, filename = ps[0].serving_dirs_and_file
self.assertEqual(serving_dirs, ['basedir/../../somedir/'])
self.assertEqual(filename, 'otherdir/file.html')