summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authortonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-16 00:15:22 +0000
committertonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-16 00:15:22 +0000
commit1c78c2f8074740546f074da00d418302b3fca37d (patch)
tree78ca52354e3f9c8cb7546ac29d8ed408895bc2c3 /tools
parentac95423484e52877d1bcac0557dfc3f1a437c9b1 (diff)
downloadchromium_src-1c78c2f8074740546f074da00d418302b3fca37d.zip
chromium_src-1c78c2f8074740546f074da00d418302b3fca37d.tar.gz
chromium_src-1c78c2f8074740546f074da00d418302b3fca37d.tar.bz2
Revert 194220 "[Telemetry] Make page cyclers more telemetric."
Caused page cycler to hang on bots. > [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 TBR=tonyg@chromium.org Review URL: https://codereview.chromium.org/14048008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194260 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, 147 insertions, 446 deletions
diff --git a/tools/perf/page_sets/page_cycler/alexa_us.json b/tools/perf/page_sets/page_cycler/alexa_us.json
index 106866a..06bc5a7 100644
--- a/tools/perf/page_sets/page_cycler/alexa_us.json
+++ b/tools/perf/page_sets/page_cycler/alexa_us.json
@@ -1,26 +1,10 @@
{
"description": "Alexa US page_cycler benchmark",
- "serving_dirs": ["../../../../data/page_cycler/alexa_us"],
"pages": [
- { "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/" }
+ {
+ "url": "file:///../../../../data/page_cycler/alexa_us/start.html?iterations=10&auto=1",
+ "serving_dirs": ["../../../../data/page_cycler/common",
+ "../../../../data/page_cycler/alexa_us"]
+ }
]
}
diff --git a/tools/perf/page_sets/page_cycler/bloat.json b/tools/perf/page_sets/page_cycler/bloat.json
index a42ce32..a633b70 100644
--- a/tools/perf/page_sets/page_cycler/bloat.json
+++ b/tools/perf/page_sets/page_cycler/bloat.json
@@ -1,7 +1,10 @@
{
"description": "Bloat page_cycler benchmark",
- "serving_dirs": ["../../../../data/page_cycler/bloat"],
"pages": [
- { "url": "file:///../../../../data/page_cycler/bloat/gmail_load_cleardot/" }
+ {
+ "url": "file:///../../../../data/page_cycler/bloat/start.html?iterations=10&auto=1",
+ "serving_dirs": ["../../../../data/page_cycler/common",
+ "../../../../data/page_cycler/bloat"]
+ }
]
}
diff --git a/tools/perf/page_sets/page_cycler/dhtml.json b/tools/perf/page_sets/page_cycler/dhtml.json
index 04e91e9..7355220 100644
--- a/tools/perf/page_sets/page_cycler/dhtml.json
+++ b/tools/perf/page_sets/page_cycler/dhtml.json
@@ -1,23 +1,10 @@
{
"description": "DHTML page_cycler benchmark",
- "serving_dirs": ["../../../../data/page_cycler/dhtml"],
"pages": [
- { "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/" }
+ {
+ "url": "file:///../../../../data/page_cycler/dhtml/start.html?iterations=10&auto=1",
+ "serving_dirs": ["../../../../data/page_cycler/common",
+ "../../../../data/page_cycler/dhtml"]
+ }
]
}
diff --git a/tools/perf/page_sets/page_cycler/dom.json b/tools/perf/page_sets/page_cycler/dom.json
index e2cb750..58f3c9e 100644
--- a/tools/perf/page_sets/page_cycler/dom.json
+++ b/tools/perf/page_sets/page_cycler/dom.json
@@ -1,15 +1,10 @@
{
"description": "DOM page_cycler benchmark",
- "serving_dirs": ["../../../../data/page_cycler/dom"],
"pages": [
- { "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/" }
+ {
+ "url": "file:///../../../../data/page_cycler/dom/start.html?iterations=10&auto=1",
+ "serving_dirs": ["../../../../data/page_cycler/common",
+ "../../../../data/page_cycler/dom"]
+ }
]
}
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 f7caf72..7e64e5e 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,8 +1,10 @@
{
"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/" }
+ {
+ "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"]
+ }
]
}
diff --git a/tools/perf/page_sets/page_cycler/intl1.json b/tools/perf/page_sets/page_cycler/intl1.json
index 97c206e..1b25597 100644
--- a/tools/perf/page_sets/page_cycler/intl1.json
+++ b/tools/perf/page_sets/page_cycler/intl1.json
@@ -1,62 +1,10 @@
{
"description": "Intl1 page_cycler benchmark",
- "serving_dirs": ["../../../../data/page_cycler/intl1"],
"pages": [
- { "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/" }
+ {
+ "url": "file:///../../../../data/page_cycler/intl1/start.html?iterations=10&auto=1",
+ "serving_dirs": ["../../../../data/page_cycler/common",
+ "../../../../data/page_cycler/intl1"]
+ }
]
}
diff --git a/tools/perf/page_sets/page_cycler/intl2.json b/tools/perf/page_sets/page_cycler/intl2.json
index b3520b7..ceb899a 100644
--- a/tools/perf/page_sets/page_cycler/intl2.json
+++ b/tools/perf/page_sets/page_cycler/intl2.json
@@ -1,36 +1,10 @@
{
"description": "Intl2 page_cycler benchmark",
- "serving_dirs": ["../../../../data/page_cycler/intl2"],
"pages": [
- { "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/" }
+ {
+ "url": "file:///../../../../data/page_cycler/intl2/start.html?iterations=10&auto=1",
+ "serving_dirs": ["../../../../data/page_cycler/common",
+ "../../../../data/page_cycler/intl2"]
+ }
]
}
diff --git a/tools/perf/page_sets/page_cycler/morejs.json b/tools/perf/page_sets/page_cycler/morejs.json
index bb8db89..bd5f497 100644
--- a/tools/perf/page_sets/page_cycler/morejs.json
+++ b/tools/perf/page_sets/page_cycler/morejs.json
@@ -1,15 +1,10 @@
{
"description": "More JS page_cycler benchmark",
- "serving_dirs": ["../../../../data/page_cycler/morejs"],
"pages": [
- { "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/" }
+ {
+ "url": "file:///../../../../data/page_cycler/morejs/start.html?iterations=10&auto=1",
+ "serving_dirs": ["../../../../data/page_cycler/common",
+ "../../../../data/page_cycler/morejs"]
+ }
]
}
diff --git a/tools/perf/page_sets/page_cycler/morejsnp.json b/tools/perf/page_sets/page_cycler/morejsnp.json
index 926590a..ac560e1 100644
--- a/tools/perf/page_sets/page_cycler/morejsnp.json
+++ b/tools/perf/page_sets/page_cycler/morejsnp.json
@@ -1,15 +1,10 @@
{
"description": "Morejsnp page_cycler benchmark",
- "serving_dirs": ["../../../../data/page_cycler/morejsnp"],
"pages": [
- { "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/" }
+ {
+ "url": "file:///../../../../data/page_cycler/morejsnp/start.html?iterations=10&auto=1",
+ "serving_dirs": ["../../../../data/page_cycler/common",
+ "../../../../data/page_cycler/morejsnp"]
+ }
]
}
diff --git a/tools/perf/page_sets/page_cycler/moz.json b/tools/perf/page_sets/page_cycler/moz.json
index ed6b172..b42e853 100644
--- a/tools/perf/page_sets/page_cycler/moz.json
+++ b/tools/perf/page_sets/page_cycler/moz.json
@@ -1,47 +1,10 @@
{
"description": "Moz page_cycler benchmark",
- "serving_dirs": ["../../../../data/page_cycler/moz"],
"pages": [
- { "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/" }
+ {
+ "url": "file:///../../../../data/page_cycler/moz/start.html?iterations=10&auto=1",
+ "serving_dirs": ["../../../../data/page_cycler/common",
+ "../../../../data/page_cycler/moz"]
+ }
]
}
diff --git a/tools/perf/page_sets/page_cycler/moz2.json b/tools/perf/page_sets/page_cycler/moz2.json
index fd1e6ec..477cb9d 100644
--- a/tools/perf/page_sets/page_cycler/moz2.json
+++ b/tools/perf/page_sets/page_cycler/moz2.json
@@ -1,47 +1,10 @@
{
"description": "Moz2 page_cycler benchmark",
- "serving_dirs": ["../../../../data/page_cycler/moz2"],
"pages": [
- { "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/" }
+ {
+ "url": "file:///../../../../data/page_cycler/moz2/start.html?iterations=10&auto=1",
+ "serving_dirs": ["../../../../data/page_cycler/common",
+ "../../../../data/page_cycler/moz2"]
+ }
]
}
diff --git a/tools/perf/perf_tools/page_cycler.js b/tools/perf/perf_tools/page_cycler.js
deleted file mode 100644
index b364146..0000000
--- a/tools/perf/perf_tools/page_cycler.js
+++ /dev/null
@@ -1,60 +0,0 @@
-// 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 c29873e..c5a2b18 100644
--- a/tools/perf/perf_tools/page_cycler.py
+++ b/tools/perf/perf_tools/page_cycler.py
@@ -1,21 +1,6 @@
# 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
@@ -28,36 +13,15 @@ MEMORY_HISTOGRAMS = [
{'name': 'V8.MemoryHeapSampleTotalUsed', 'units': 'kb'}]
class PageCycler(page_benchmark.PageBenchmark):
- 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
-
+ def WillNavigateToPage(self, page, tab):
# 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)
@@ -88,127 +52,120 @@ class PageCycler(page_benchmark.PageBenchmark):
# Browser
if 'VM' in memory['Browser']:
- results.AddSummary('vm_size_f_b', 'bytes', memory['Browser']['VM'],
- chart_name='vm_size_final_b', data_type='unimportant')
+ results.Add('vm_size_f_b', 'bytes', memory['Browser']['VM'],
+ chart_name='vm_size_final_b', data_type='unimportant')
if 'VMPeak' in memory['Browser']:
- results.AddSummary('vm_pk_b', 'bytes', memory['Browser']['VMPeak'],
- chart_name='vm_peak_b', data_type='unimportant')
+ results.Add('vm_pk_b', 'bytes', memory['Browser']['VMPeak'],
+ chart_name='vm_peak_b', data_type='unimportant')
if 'WorkingSetSize' in memory['Browser']:
- results.AddSummary('vm_%s_f_b' % metric, 'bytes',
- memory['Browser']['WorkingSetSize'],
- chart_name='vm_%s_final_b' % metric,
- data_type='unimportant')
+ results.Add('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.AddSummary('%s_pk_b' % metric, 'bytes',
- memory['Browser']['WorkingSetSizePeak'],
- chart_name='%s_peak_b' % metric,
- data_type='unimportant')
+ results.Add('%s_pk_b' % metric, 'bytes',
+ memory['Browser']['WorkingSetSizePeak'],
+ chart_name='%s_peak_b' % metric, data_type='unimportant')
if 'PrivateDirty' in memory['Browser']:
- results.AddSummary('vm_private_dirty_f_b', 'bytes',
- memory['Browser']['PrivateDirty'],
- chart_name='vm_private_dirty_final_b',
- data_type='unimportant')
+ results.Add('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.AddSummary('vm_pss_f_b', 'bytes',
- memory['Browser']['ProportionalSetSize'],
- chart_name='vm_pss_final_b', data_type='unimportant')
+ results.Add('vm_pss_f_b', 'bytes',
+ memory['Browser']['ProportionalSetSize'],
+ chart_name='vm_pss_final_b', data_type='unimportant')
# Renderer
if 'VM' in memory['Renderer']:
- results.AddSummary('vm_size_f_r', 'bytes', memory['Renderer']['VM'],
- chart_name='vm_size_final_r', data_type='unimportant')
+ results.Add('vm_size_f_r', 'bytes', memory['Renderer']['VM'],
+ chart_name='vm_size_final_r', data_type='unimportant')
if 'VMPeak' in memory['Renderer']:
- results.AddSummary('vm_pk_r', 'bytes', memory['Browser']['VMPeak'],
- chart_name='vm_peak_r', data_type='unimportant')
+ results.Add('vm_pk_r', 'bytes', memory['Browser']['VMPeak'],
+ chart_name='vm_peak_r', data_type='unimportant')
if 'WorkingSetSize' in memory['Renderer']:
- results.AddSummary('vm_%s_f_r' % metric, 'bytes',
- memory['Renderer']['WorkingSetSize'],
- chart_name='vm_%s_final_r' % metric,
- data_type='unimportant')
+ results.Add('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.AddSummary('%s_pk_r' % metric, 'bytes',
- memory['Browser']['WorkingSetSizePeak'],
- chart_name='%s_peak_r' % metric,
- data_type='unimportant')
+ results.Add('%s_pk_r' % metric, 'bytes',
+ memory['Browser']['WorkingSetSizePeak'],
+ chart_name='%s_peak_r' % metric, data_type='unimportant')
if 'PrivateDirty' in memory['Renderer']:
- results.AddSummary('vm_private_dirty_f_r', 'bytes',
- memory['Renderer']['PrivateDirty'],
- chart_name='vm_private_dirty_final_r',
- data_type='unimportant')
+ results.Add('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.AddSummary('vm_pss_f_r', 'bytes',
- memory['Renderer']['ProportionalSetSize'],
- chart_name='vm_pss_final_r', data_type='unimportant')
+ results.Add('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.AddSummary('vm_size_f_t', 'bytes',
- memory['Browser']['VM'] + memory['Renderer']['VM'],
- chart_name='vm_size_final_t', data_type='unimportant')
+ results.Add('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.AddSummary('vm_%s_f_t' % metric, 'bytes',
- memory['Browser']['WorkingSetSize'] +
- memory['Renderer']['WorkingSetSize'],
- chart_name='vm_%s_final_t' % metric,
- data_type='unimportant')
+ results.Add('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.AddSummary('vm_private_dirty_f_t', 'bytes',
- memory['Browser']['PrivateDirty'] +
- memory['Renderer']['PrivateDirty'],
- chart_name='vm_private_dirty_final_t',
- data_type='unimportant')
+ results.Add('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.AddSummary('vm_pss_f_t', 'bytes',
- memory['Browser']['ProportionalSetSize'] +
- memory['Renderer']['ProportionalSetSize'],
- chart_name='vm_pss_final_t', data_type='unimportant')
+ results.Add('vm_pss_f_t', 'bytes',
+ memory['Browser']['ProportionalSetSize'] +
+ memory['Renderer']['ProportionalSetSize'],
+ chart_name='vm_pss_final_t', 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')
+ 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')
def MeasureIO(self, tab, results):
io_stats = tab.browser.io_stats
if not io_stats['Browser']:
return
- 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')
+ 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')
def MeasurePage(self, page, tab, results):
def _IsDone():
- return bool(tab.GetCookieByName('__pc_load_time'))
- util.WaitFor(_IsDone, 1200)
+ 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)
for h in self.histograms:
h.GetValue(page, tab, results)
- 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)
+ 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')
diff --git a/tools/telemetry/telemetry/page/page.py b/tools/telemetry/telemetry/page/page.py
index 1ec09e0..d7b075c 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.page_set, 'serving_dirs'):
- url_base_dir = os.path.commonprefix(self.page_set.serving_dirs)
+ if hasattr(self, 'serving_dirs'):
+ url_base_dir = os.path.commonprefix(self.serving_dirs)
base_path = self.base_dir + '/' + url_base_dir
- return ([self.base_dir + '/' + d for d in self.page_set.serving_dirs],
+ return ([self.base_dir + '/' + d for d in self.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 32eab68..b13e2b9 100644
--- a/tools/telemetry/telemetry/page/page_benchmark_results.py
+++ b/tools/telemetry/telemetry/page/page_benchmark_results.py
@@ -123,14 +123,12 @@ 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 9ef41ac..a7b0f9a 100644
--- a/tools/telemetry/telemetry/page/page_unittest.py
+++ b/tools/telemetry/telemetry/page/page_unittest.py
@@ -25,14 +25,11 @@ class TestPage(unittest.TestCase):
self.assertEqual(filename, 'file.html')
def testGetUrlBaseDirAndFileForUrlBaseDir(self):
- 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
+ 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
self.assertEqual(serving_dirs, ['basedir/../../somedir/'])
self.assertEqual(filename, 'otherdir/file.html')