Commit 1237dbe2 authored by rnephew's avatar rnephew Committed by Commit Bot

[Telemetry] Move system_health_csv_generator to use expectations file.

Bug: 781409
Change-Id: I70d28e9f43a4747f19666fbfa9f3bb18ac1d22d7
Reviewed-on: https://chromium-review.googlesource.com/830256Reviewed-by: default avatarNed Nguyen <nednguyen@google.com>
Reviewed-by: default avatarCharlie Andrews <charliea@chromium.org>
Commit-Queue: rnephew <rnephew@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524454}
parent a86dd477
...@@ -6,10 +6,14 @@ import csv ...@@ -6,10 +6,14 @@ import csv
import sys import sys
from core import path_util from core import path_util
sys.path.insert(1, path_util.GetPerfDir()) # To resolve perf imports sys.path.insert(1, path_util.GetPerfDir()) # To resolve perf imports
sys.path.insert(1, path_util.GetTelemetryDir()) # To resolve telemetry imports path_util.AddPyUtilsToPath()
path_util.AddTelemetryToPath()
import page_sets import page_sets
from page_sets.system_health import expectations from page_sets.system_health import expectations
from py_utils import expectations_parser
from telemetry.story import expectations as expectations_module
def IterAllSystemHealthStories(): def IterAllSystemHealthStories():
for s in page_sets.SystemHealthStorySet(platform='desktop'): for s in page_sets.SystemHealthStorySet(platform='desktop'):
...@@ -50,11 +54,24 @@ def PopulateExpectations(all_expectations): ...@@ -50,11 +54,24 @@ def PopulateExpectations(all_expectations):
def GenerateSystemHealthCSV(file_path): def GenerateSystemHealthCSV(file_path):
system_health_stories = list(IterAllSystemHealthStories()) system_health_stories = list(IterAllSystemHealthStories())
e = expectations_module.StoryExpectations()
with open(path_util.GetExpectationsPath()) as fp:
parser = expectations_parser.TestExpectationParser(fp.read())
benchmarks = ['system_health.common_desktop', 'system_health.common_mobile',
'system_health.memory_desktop', 'system_health.memory_mobile']
for benchmark in benchmarks:
e.GetBenchmarkExpectationsFromParser(parser.expectations, benchmark)
all_expectations = [ all_expectations = [
e.AsDict()['stories'],
# TODO(rnephew): Delete these when system health uses file.
expectations.SystemHealthDesktopCommonExpectations().AsDict()['stories'], expectations.SystemHealthDesktopCommonExpectations().AsDict()['stories'],
expectations.SystemHealthDesktopMemoryExpectations().AsDict()['stories'], expectations.SystemHealthDesktopMemoryExpectations().AsDict()['stories'],
expectations.SystemHealthMobileCommonExpectations().AsDict()['stories'], expectations.SystemHealthMobileCommonExpectations().AsDict()['stories'],
expectations.SystemHealthMobileMemoryExpectations().AsDict()['stories'],] expectations.SystemHealthMobileMemoryExpectations().AsDict()['stories'],]
disabed_platforms = PopulateExpectations(all_expectations) disabed_platforms = PopulateExpectations(all_expectations)
system_health_stories.sort(key=lambda s: s.name) system_health_stories.sort(key=lambda s: s.name)
with open(file_path, 'w') as f: with open(file_path, 'w') as f:
......
...@@ -3,116 +3,118 @@ background:media:imgur,mobile,"Load http://imgur.com/gallery/hUita, then put the ...@@ -3,116 +3,118 @@ background:media:imgur,mobile,"Load http://imgur.com/gallery/hUita, then put the
background:news:nytimes,mobile,"Load http://www.nytimes.com/2016/10/04/us/politics/vice-presidential-debate.html?_r=0, then put the browser into the background.", background:news:nytimes,mobile,"Load http://www.nytimes.com/2016/10/04/us/politics/vice-presidential-debate.html?_r=0, then put the browser into the background.",
background:search:google,mobile,"Load https://www.google.co.uk/#q=tom+cruise+movies, then put the browser into the background.", background:search:google,mobile,"Load https://www.google.co.uk/#q=tom+cruise+movies, then put the browser into the background.",
background:social:facebook,mobile,"Load https://www.facebook.com/rihanna, then put the browser into the background.", background:social:facebook,mobile,"Load https://www.facebook.com/rihanna, then put the browser into the background.",
background:tools:gmail,mobile,Load https://mail.google.com/mail/, background:tools:gmail,mobile,Load https://mail.google.com/mail/,Nexus 5
browse:chrome:newtab,mobile,"Story that loads new tab page and performs searches. browse:chrome:newtab,mobile,"Story that loads new tab page and performs searches.
Given a list of typical search queries, this story does for each of them: Given a list of typical search queries, this story does for each of them:
- enter the search query on the new tab page search box - enter the search query on the new tab page search box
- read results - read results
- navigates back to new tab page - navigates back to new tab page
",Android Webview ",Android Webview
browse:chrome:omnibox,mobile,"Story that peforms search by using omnibox search provider browse:chrome:omnibox,mobile,"Story that peforms search by using omnibox search provider
Loads a website and enters a search query on omnibox and navigates to default Loads a website and enters a search query on omnibox and navigates to default
search provider (google). search provider (google).
",Android Webview ",Android Webview
browse:media:facebook_photos,mobile,"Load a photo page from Rihanna's facebook page then navigate a few next browse:media:facebook_photos,mobile,"Load a photo page from Rihanna's facebook page then navigate a few next
photos. photos.
", ",
browse:media:flickr_infinite_scroll,desktop,Load https://www.flickr.com/explore then make a very long scroll., browse:media:flickr_infinite_scroll,desktop,Load https://www.flickr.com/explore then make a very long scroll.,
browse:media:flickr_infinite_scroll,mobile,Load https://www.flickr.com/explore then make a very long scroll., browse:media:flickr_infinite_scroll,mobile,Load https://www.flickr.com/explore then make a very long scroll.,
browse:media:imgur,desktop,Load http://imgur.com/gallery/5UlBN and navigate to some items/articles., browse:media:imgur,desktop,Load http://imgur.com/gallery/5UlBN and navigate to some items/articles.,
browse:media:imgur,mobile,Load http://imgur.com/gallery/5UlBN and navigate to some items/articles., browse:media:imgur,mobile,Load http://imgur.com/gallery/5UlBN and navigate to some items/articles.,
browse:media:pinterest,desktop,Load https://pinterest.com and navigate to some items/articles., browse:media:pinterest,desktop,Load https://pinterest.com and navigate to some items/articles.,
browse:media:tumblr,desktop,Load https://tumblr.com/search/gifs and navigate to some items/articles.,Mac 10.11 browse:media:tumblr,desktop,Load https://tumblr.com/search/gifs and navigate to some items/articles.,Win
browse:media:youtube,desktop,"Load a typical YouTube video then navigate to a next few videos. Stop and browse:media:youtube,desktop,"Load a typical YouTube video then navigate to a next few videos. Stop and
watch each video for a few seconds. watch each video for a few seconds.
", ",
browse:media:youtube,mobile,"Load a typical YouTube video then navigate to a next few videos. Stop and browse:media:youtube,mobile,"Load a typical YouTube video then navigate to a next few videos. Stop and
watch each video for few seconds. watch each video for few seconds.
", ",
browse:news:cnn,all,The second top website in http://www.alexa.com/topsites/category/News,Mac Platforms browse:news:cnn,all,The second top website in http://www.alexa.com/topsites/category/News,Mac
browse:news:cricbuzz,mobile,Load http://m.cricbuzz.com and navigate to some items/articles., browse:news:cricbuzz,mobile,Load http://m.cricbuzz.com and navigate to some items/articles.,
browse:news:flipboard,desktop,Load https://flipboard.com/explore and navigate to some items/articles., browse:news:flipboard,desktop,Load https://flipboard.com/explore and navigate to some items/articles.,
browse:news:globo,mobile,Load http://www.globo.com and navigate to some items/articles.,Android Platforms browse:news:globo,mobile,Load http://www.globo.com and navigate to some items/articles.,Android
browse:news:hackernews,desktop,Load https://news.ycombinator.com and navigate to some items/articles.,"Win Platforms, Mac Platforms" browse:news:hackernews,desktop,Load https://news.ycombinator.com and navigate to some items/articles.,"Win, Mac"
browse:news:nytimes,desktop,The third top website in http://www.alexa.com/topsites/category/News, browse:news:nytimes,desktop,The third top website in http://www.alexa.com/topsites/category/News,
browse:news:qq,mobile,Load http://news.qq.com and navigate to some items/articles., browse:news:qq,mobile,Load http://news.qq.com and navigate to some items/articles.,
browse:news:reddit,desktop,The top website in http://www.alexa.com/topsites/category/News, browse:news:reddit,desktop,The top website in http://www.alexa.com/topsites/category/News,
browse:news:reddit,mobile,The top website in http://www.alexa.com/topsites/category/News, browse:news:reddit,mobile,The top website in http://www.alexa.com/topsites/category/News,
browse:news:toi,mobile,Load http://m.timesofindia.com and navigate to some items/articles.,Android Platforms browse:news:toi,mobile,Load http://m.timesofindia.com and navigate to some items/articles.,Android
browse:news:washingtonpost,mobile,Progressive website, browse:news:washingtonpost,mobile,Progressive website,
browse:search:google,desktop," browse:search:google,desktop,"
A typical google search story: A typical google search story:
_ Start at https://www.google.com/search?q=flower _ Start at https://www.google.com/search?q=flower
_ Click on the wikipedia link & navigate to _ Click on the wikipedia link & navigate to
https://en.wikipedia.org/wiki/Flower https://en.wikipedia.org/wiki/Flower
_ Scroll down the wikipedia page about flower. _ Scroll down the wikipedia page about flower.
_ Back to the search main page. _ Back to the search main page.
_ Refine the search query to 'flower delivery'. _ Refine the search query to 'flower delivery'.
_ Scroll down the page. _ Scroll down the page.
_ Click the next page result of 'flower delivery'. _ Click the next page result of 'flower delivery'.
_ Scroll the search page. _ Scroll the search page.
",Win Platforms ",Win
browse:search:google_india,desktop," browse:search:google_india,desktop,"
A typical google search story in India: A typical google search story in India:
1. Start at https://www.google.co.in/search?q=%E0%A4%AB%E0%A5%82%E0%A4%B2` 1. Start at https://www.google.co.in/search?q=%E0%A4%AB%E0%A5%82%E0%A4%B2`
2. Scroll down the page. 2. Scroll down the page.
3. Refine the query & click search box, which navigates to 3. Refine the query & click search box, which navigates to
https://www.google.co.in/search?q=%E0%A4%AB%E0%A5%82%E0%A4%B2&rct=j#q=%E0%A4%AB%E0%A5%82%E0%A4%B2+%E0%A4%B5%E0%A4%BF%E0%A4%A4%E0%A4%B0%E0%A4%A3 https://www.google.co.in/search?q=%E0%A4%AB%E0%A5%82%E0%A4%B2&rct=j#q=%E0%A4%AB%E0%A5%82%E0%A4%B2+%E0%A4%B5%E0%A4%BF%E0%A4%A4%E0%A4%B0%E0%A4%A3
4. Scroll down the page. 4. Scroll down the page.
5. Click the next page result 5. Click the next page result
6. Scroll the search result page. 6. Scroll the search result page.
", ",
browse:shopping:amazon,mobile,Load https://www.amazon.co.in/s/?field-keywords=Mobile and navigate to some items/articles., browse:shopping:amazon,mobile,Load https://www.amazon.co.in/s/?field-keywords=Mobile and navigate to some items/articles.,
browse:shopping:avito,mobile,Load https://www.avito.ru/rossiya and navigate to some items/articles.,Nexus 6 browse:shopping:avito,mobile,Load https://www.avito.ru/rossiya and navigate to some items/articles.,Nexus 6
browse:shopping:flipkart,mobile,Load https://flipkart.com/search?q=Sunglasses and navigate to some items/articles.,Android Platforms browse:shopping:flipkart,mobile,Load https://flipkart.com/search?q=Sunglasses and navigate to some items/articles.,Android
browse:shopping:lazada,mobile,Load https://www.lazada.co.id/catalog/?q=Wrist+watch and navigate to some items/articles., browse:shopping:lazada,mobile,Load https://www.lazada.co.id/catalog/?q=Wrist+watch and navigate to some items/articles.,
browse:social:facebook,mobile,Load https://www.facebook.com/rihanna and navigate to some items/articles., browse:social:facebook,mobile,Load https://www.facebook.com/rihanna and navigate to some items/articles.,Nexus 5
browse:social:facebook_infinite_scroll,desktop,Load https://www.facebook.com/shakira then make a very long scroll., browse:social:facebook_infinite_scroll,desktop,Load https://www.facebook.com/shakira then make a very long scroll.,
browse:social:facebook_infinite_scroll,mobile,Load https://m.facebook.com/shakira then make a very long scroll., browse:social:facebook_infinite_scroll,mobile,Load https://m.facebook.com/shakira then make a very long scroll.,
browse:social:instagram,mobile,Load https://www.instagram.com/badgalriri/ and navigate to some items/articles., browse:social:instagram,mobile,Load https://www.instagram.com/badgalriri/ and navigate to some items/articles.,
browse:social:pinterest_infinite_scroll,mobile,Load https://www.pinterest.com/all then make a very long scroll.,Android Webview browse:social:pinterest_infinite_scroll,mobile,Load https://www.pinterest.com/all then make a very long scroll.,
browse:social:tumblr_infinite_scroll,all,Load http://techcrunch.tumblr.com/ then make a very long scroll., browse:social:tumblr_infinite_scroll,all,Load http://techcrunch.tumblr.com/ then make a very long scroll.,
browse:social:twitter,desktop,Load https://www.twitter.com/nasa and navigate to some items/articles., browse:social:twitter,desktop,Load https://www.twitter.com/nasa and navigate to some items/articles.,
browse:social:twitter,mobile,Load https://www.twitter.com/nasa and navigate to some items/articles., browse:social:twitter,mobile,Load https://www.twitter.com/nasa and navigate to some items/articles.,
browse:social:twitter_infinite_scroll,desktop,Load https://twitter.com/taylorswift13 then make a very long scroll.,Win Platforms browse:social:twitter_infinite_scroll,desktop,Load https://twitter.com/taylorswift13 then make a very long scroll.,Win
browse:tech:discourse_infinite_scroll,desktop,Load https://meta.discourse.org/t/the-official-discourse-tags-plugin-discourse-tagging/26482 then make a very long scroll., browse:tech:discourse_infinite_scroll,desktop,Load https://meta.discourse.org/t/the-official-discourse-tags-plugin-discourse-tagging/26482 then make a very long scroll.,
browse:tech:discourse_infinite_scroll,mobile,Load https://meta.discourse.org/t/the-official-discourse-tags-plugin-discourse-tagging/26482 then make a very long scroll., browse:tech:discourse_infinite_scroll,mobile,Load https://meta.discourse.org/t/the-official-discourse-tags-plugin-discourse-tagging/26482 then make a very long scroll.,
browse:tools:earth,desktop," browse:tools:earth,desktop,"
Google Earth story: Google Earth story:
_ Start at https://www.maps.google.com/maps _ Start at https://www.maps.google.com/maps
_ Click on the Earth link _ Click on the Earth link
_ Click ZoomIn three times, waiting for 3 sec in between. _ Click ZoomIn three times, waiting for 3 sec in between.
",All Platforms ",
browse:tools:maps,desktop," browse:tools:maps,desktop,"
Google maps story: Google maps story:
_ Start at https://www.maps.google.com/maps _ Start at https://www.maps.google.com/maps
_ Search for ""restaurents near me"" and wait for 4 sec. _ Search for ""restaurents near me"" and wait for 4 sec.
_ Click ZoomIn two times, waiting for 3 sec in between. _ Click ZoomIn two times, waiting for 3 sec in between.
_ Scroll the map horizontally and vertically. _ Scroll the map horizontally and vertically.
_ Pick a restaurant and ask for directions. _ Pick a restaurant and ask for directions.
",All Platforms ",Mac
browse:tools:maps,mobile,"Story that browses google maps mobile page browse:tools:maps,mobile,"Story that browses google maps mobile page
This story searches for nearby restaurants on google maps website and finds This story searches for nearby restaurants on google maps website and finds
directions to a chosen restaurant from search results. directions to a chosen restaurant from search results.
",All Platforms ",Mac
browse_accessibility:tech:codesearch,desktop,Tests scrolling an element within a page.,
browse_accessibility:tools:gmail_compose,desktop,Tests typing a lot of text into a Gmail compose window.,All
load:chrome:blank,all,Story that loads the about:blank page., load:chrome:blank,all,Story that loads the about:blank page.,
load:games:alphabetty,desktop,Load https://king.com/play/alphabetty, load:games:alphabetty,desktop,Load https://king.com/play/alphabetty,
load:games:bubbles,all,"Load ""smarty bubbles"" game on famobi.com", load:games:bubbles,all,"Load ""smarty bubbles"" game on famobi.com",
load:games:lazors,all,Load http://www8.games.mobi/games/html5/lazors/lazors.html, load:games:lazors,all,Load http://www8.games.mobi/games/html5/lazors/lazors.html,
load:games:miniclip,desktop,Load http://www.miniclip.com/games/en/,Mac Platforms load:games:miniclip,desktop,Load http://www.miniclip.com/games/en/,Mac
load:games:spychase,all,Load http://playstar.mobi/games/spychase/index.php, load:games:spychase,all,Load http://playstar.mobi/games/spychase/index.php,
load:media:9gag,desktop,Load https://www.9gag.com/, load:media:9gag,desktop,Load https://www.9gag.com/,
load:media:dailymotion,all,Load https://www.dailymotion.com/video/x489k7d_street-performer-shows-off-slinky-skills_fun?autoplay=false, load:media:dailymotion,all,Load https://www.dailymotion.com/video/x489k7d_street-performer-shows-off-slinky-skills_fun?autoplay=false,
load:media:facebook_photos,mobile,Load a page of rihanna's facebook with a photo., load:media:facebook_photos,mobile,Load a page of rihanna's facebook with a photo.,
load:media:google_images,all,Load https://www.google.co.uk/search?tbm=isch&q=love, load:media:google_images,all,Load https://www.google.co.uk/search?tbm=isch&q=love,
load:media:imgur,all,Load http://imgur.com/gallery/5UlBN, load:media:imgur,all,Load http://imgur.com/gallery/5UlBN,
load:media:soundcloud,all,Load https://soundcloud.com/lifeofdesiigner/desiigner-panda, load:media:soundcloud,all,Load https://soundcloud.com/lifeofdesiigner/desiigner-panda,Android Webview
load:media:youtube,all,Load https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false, load:media:youtube,all,Load https://www.youtube.com/watch?v=QGfhS1hfTWw&autoplay=false,
load:news:bbc,desktop,Load https://www.bbc.co.uk/news/world-asia-china-36189636, load:news:bbc,desktop,Load https://www.bbc.co.uk/news/world-asia-china-36189636,
load:news:cnn,all,Load http://edition.cnn.com, load:news:cnn,all,Load http://edition.cnn.com,
...@@ -141,15 +143,17 @@ load:social:vk,desktop,Load https://vk.com/sbeatles, ...@@ -141,15 +143,17 @@ load:social:vk,desktop,Load https://vk.com/sbeatles,
load:tools:docs,all,Load a typical google doc page., load:tools:docs,all,Load a typical google doc page.,
load:tools:drive,all,Load https://drive.google.com/drive/my-drive,"Nexus 5X, Android Webview" load:tools:drive,all,Load https://drive.google.com/drive/my-drive,"Nexus 5X, Android Webview"
load:tools:dropbox,all,Load https://www.dropbox.com, load:tools:dropbox,all,Load https://www.dropbox.com,
load:tools:gmail,desktop,Load https://mail.google.com/mail/,Android Platforms load:tools:gmail,desktop,Load https://mail.google.com/mail/,Android
load:tools:gmail,mobile,Load https://mail.google.com/mail/,Android Platforms load:tools:gmail,mobile,Load https://mail.google.com/mail/,Android
load:tools:stackoverflow,all,Load a typical question & answer page of stackoverflow.com, load:tools:stackoverflow,all,Load a typical question & answer page of stackoverflow.com,
load:tools:weather,all,Load https://weather.com/en-GB/weather/today/l/USCA0286:1:US, load:tools:weather,all,Load https://weather.com/en-GB/weather/today/l/USCA0286:1:US,
long_running:tools:gmail-background,desktop,Load https://mail.google.com/mail/ then open a new blank tab and let the loaded page stay in background for 100 seconds.,Android Webview load_accessibility:media:wikipedia,desktop,"Wikipedia page on Accessibility. Long, but very simple, clean layout.",
long_running:tools:gmail-background,mobile,Load https://mail.google.com/mail/ then open a new blank tab and let the loaded page stay in background for 100 seconds.,Android Webview load_accessibility:shopping:amazon,desktop,Amazon results page. Good example of a site with a data table.,
long_running:tools:gmail-background,desktop,Load https://mail.google.com/mail/ then open a new blank tab and let the loaded page stay in background for 100 seconds.,"Android Webview, Android Svelte"
long_running:tools:gmail-background,mobile,Load https://mail.google.com/mail/ then open a new blank tab and let the loaded page stay in background for 100 seconds.,"Android Webview, Android Svelte"
long_running:tools:gmail-foreground,desktop,Load https://mail.google.com/mail/ then let it stay in foreground for 100 seconds., long_running:tools:gmail-foreground,desktop,Load https://mail.google.com/mail/ then let it stay in foreground for 100 seconds.,
long_running:tools:gmail-foreground,mobile,Load https://mail.google.com/mail/ then let it stay in foreground for 100 seconds., long_running:tools:gmail-foreground,mobile,Load https://mail.google.com/mail/ then let it stay in foreground for 100 seconds.,
multitab:misc:typical24,desktop,"Load 24 different web sites in 24 tabs, then cycle through each tab.",Mac Platforms multitab:misc:typical24,desktop,"Load 24 different web sites in 24 tabs, then cycle through each tab.",Mac
play:media:google_play_music,desktop,"Browse the songs list in music.google.com, then play a song.",All Platforms play:media:google_play_music,desktop,"Browse the songs list in music.google.com, then play a song.",All
play:media:pandora,desktop,"Load pandora.com, then play a song.",All Platforms play:media:pandora,desktop,"Load pandora.com, then play a song.",All
play:media:soundcloud,desktop,"Load soundcloud.com, search for ""Smooth Jazz"", then play a song.",Win Platforms play:media:soundcloud,desktop,"Load soundcloud.com, search for ""Smooth Jazz"", then play a song.",Win
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment