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
import sys
from core import path_util
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
from page_sets.system_health import expectations
from py_utils import expectations_parser
from telemetry.story import expectations as expectations_module
def IterAllSystemHealthStories():
for s in page_sets.SystemHealthStorySet(platform='desktop'):
......@@ -50,11 +54,24 @@ def PopulateExpectations(all_expectations):
def GenerateSystemHealthCSV(file_path):
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 = [
e.AsDict()['stories'],
# TODO(rnephew): Delete these when system health uses file.
expectations.SystemHealthDesktopCommonExpectations().AsDict()['stories'],
expectations.SystemHealthDesktopMemoryExpectations().AsDict()['stories'],
expectations.SystemHealthMobileCommonExpectations().AsDict()['stories'],
expectations.SystemHealthMobileMemoryExpectations().AsDict()['stories'],]
disabed_platforms = PopulateExpectations(all_expectations)
system_health_stories.sort(key=lambda s: s.name)
with open(file_path, 'w') as f:
......
......@@ -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: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:tools:gmail,mobile,Load https://mail.google.com/mail/,
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:
- enter the search query on the new tab page search box
- read results
- navigates back to new tab page
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.
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
- read results
- navigates back to new tab page
",Android Webview
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
search provider (google).
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
search provider (google).
",Android Webview
browse:media:facebook_photos,mobile,"Load a photo page from Rihanna's facebook page then navigate a few next
photos.
browse:media:facebook_photos,mobile,"Load a photo page from Rihanna's facebook page then navigate a few next
photos.
",
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: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: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:youtube,desktop,"Load a typical YouTube video then navigate to a next few videos. Stop and
watch each video for a few seconds.
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
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
watch each video for few seconds.
browse:media:youtube,mobile,"Load a typical YouTube video then navigate to a next few videos. Stop and
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: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:hackernews,desktop,Load https://news.ycombinator.com and navigate to some items/articles.,"Win Platforms, Mac 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, Mac"
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: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: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:search:google,desktop,"
A typical google search story:
_ Start at https://www.google.com/search?q=flower
_ Click on the wikipedia link & navigate to
https://en.wikipedia.org/wiki/Flower
_ Scroll down the wikipedia page about flower.
_ Back to the search main page.
_ Refine the search query to 'flower delivery'.
_ Scroll down the page.
_ Click the next page result of 'flower delivery'.
_ Scroll the search page.
",Win Platforms
browse:search:google_india,desktop,"
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`
2. Scroll down the page.
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
4. Scroll down the page.
5. Click the next page result
6. Scroll the search result page.
browse:search:google,desktop,"
A typical google search story:
_ Start at https://www.google.com/search?q=flower
_ Click on the wikipedia link & navigate to
https://en.wikipedia.org/wiki/Flower
_ Scroll down the wikipedia page about flower.
_ Back to the search main page.
_ Refine the search query to 'flower delivery'.
_ Scroll down the page.
_ Click the next page result of 'flower delivery'.
_ Scroll the search page.
",Win
browse:search:google_india,desktop,"
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`
2. Scroll down the page.
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
4. Scroll down the page.
5. Click the next page result
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: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: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,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: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: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_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,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,"
Google Earth story:
_ Start at https://www.maps.google.com/maps
_ Click on the Earth link
_ Click ZoomIn three times, waiting for 3 sec in between.
",All Platforms
browse:tools:maps,desktop,"
Google maps story:
_ Start at https://www.maps.google.com/maps
_ Search for ""restaurents near me"" and wait for 4 sec.
_ Click ZoomIn two times, waiting for 3 sec in between.
_ Scroll the map horizontally and vertically.
_ Pick a restaurant and ask for directions.
",All Platforms
browse:tools:maps,mobile,"Story that browses google maps mobile page
This story searches for nearby restaurants on google maps website and finds
directions to a chosen restaurant from search results.
",All Platforms
browse:tools:earth,desktop,"
Google Earth story:
_ Start at https://www.maps.google.com/maps
_ Click on the Earth link
_ Click ZoomIn three times, waiting for 3 sec in between.
",
browse:tools:maps,desktop,"
Google maps story:
_ Start at https://www.maps.google.com/maps
_ Search for ""restaurents near me"" and wait for 4 sec.
_ Click ZoomIn two times, waiting for 3 sec in between.
_ Scroll the map horizontally and vertically.
_ Pick a restaurant and ask for directions.
",Mac
browse:tools:maps,mobile,"Story that browses google maps mobile page
This story searches for nearby restaurants on google maps website and finds
directions to a chosen restaurant from search results.
",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:games:alphabetty,desktop,Load https://king.com/play/alphabetty,
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: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: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: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: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:news:bbc,desktop,Load https://www.bbc.co.uk/news/world-asia-china-36189636,
load:news:cnn,all,Load http://edition.cnn.com,
......@@ -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: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:gmail,desktop,Load https://mail.google.com/mail/,Android Platforms
load:tools:gmail,mobile,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
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,
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
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:media:wikipedia,desktop,"Wikipedia page on Accessibility. Long, but very simple, clean layout.",
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,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
play:media:google_play_music,desktop,"Browse the songs list in music.google.com, then play a song.",All Platforms
play:media:pandora,desktop,"Load pandora.com, then play a song.",All Platforms
play:media:soundcloud,desktop,"Load soundcloud.com, search for ""Smooth Jazz"", then play a song.",Win 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
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
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