{"id":16200950,"url":"https://github.com/marks/rubyscriptpageload","last_synced_at":"2025-04-07T18:16:23.909Z","repository":{"id":6083336,"uuid":"7309946","full_name":"marks/RubyScriptPageLoad","owner":"marks","description":"Quick solution for bevan on bountify.co (https://bountify.co/ruby-script-to-display-itemized-page-weight-of-a-website)","archived":false,"fork":false,"pushed_at":"2013-01-02T23:58:01.000Z","size":166,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T20:14:57.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-24T17:31:47.000Z","updated_at":"2013-12-17T10:10:12.000Z","dependencies_parsed_at":"2022-09-22T07:11:34.758Z","dependency_job_id":null,"html_url":"https://github.com/marks/RubyScriptPageLoad","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2FRubyScriptPageLoad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2FRubyScriptPageLoad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2FRubyScriptPageLoad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2FRubyScriptPageLoad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marks","download_url":"https://codeload.github.com/marks/RubyScriptPageLoad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704572,"owners_count":20982298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T09:34:57.136Z","updated_at":"2025-04-07T18:16:23.882Z","avatar_url":"https://github.com/marks.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Here's a quick solution that executes a phantomjs[1] yslow[2] script inside a ruby one. There is _a lot_ more information available from yslow[2] but I've included just a little more than you asked for in this solution due to time.\n\n**Example CLI input:** `$ ruby itemized_page_weight_of_url.rb http://mappyhealth.com`  \n**Example output:**\n\n    TOTAL PAGE SIZE: 630kb\n\n    + DOC: 15kb (over 1 requests)\n      - http://mappyhealth.com/: 15kb (16256ms response time)\n    + CSS: 138kb (over 6 requests)\n      - http://s3.amazonaws.com/mappyhealth-public/bootstrap/css/bootstrap-spacelab0.min.css: 91kb (93993ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/bootstrap/css/bootstrap-responsive0.min.css: 10kb (10709ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/showLoading/showLoading.css: 0kb (284ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/css-social-buttons/social-buttons.css: 32kb (33597ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/custom.css: 0kb (698ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/scroller.css: 2kb (2517ms response time)\n    + JS: 386kb (over 12 requests)\n      - http://www.google-analytics.com/ga.js: 36kb (37362ms response time)\n      - http://platform.twitter.com/widgets.js: 75kb (77103ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/bootstrap/js/jquery.js: 242kb (247822ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/showLoading/jquery.showLoading.min.js: 4kb (4813ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/custom.js: 1kb (1493ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/scroller.js: 1kb (1907ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/jquery.tagcloud.js: 2kb (2377ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/bootstrap/js/basic/bootstrap-modal.js: 5kb (5490ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/bootstrap/js/basic/bootstrap-dropdown.js: 2kb (2558ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/bootstrap/js/basic/bootstrap-tooltip.js: 7kb (7374ms response time)\n      - http://s3.amazonaws.com/mappyhealth-public/bootstrap/js/basic/bootstrap-collapse.js: 3kb (3912ms response time)\n      - http://cdn.api.twitter.com/1/users/show.json?screen_name=MappyHealth\u0026callback=twttr.setFollowersCount: 2kb (2070ms response time)\n    + CSSIMAGE: 4kb (over 1 requests)\n      - http://s3.amazonaws.com/mappyhealth-public/bootstrap/img/glyphicons-halflings.png: 4kb (4352ms response time)\n    + IMAGE: 0kb (over 3 requests)\n      - http://s3.amazonaws.com/mappyhealth-public/logo.gif: 0kb (732ms response time)\n      - http://p.twitter.com/f.gif?_=1356369820551\u0026id=twitter-widget-1\u0026lang=en\u0026screen_name=MappyHealth\u0026show_count=false\u0026show_screen_name=true\u0026size=m\u0026twttr_variant=2.0\u0026twttr_referrer=http%3A%2F%2Fmappyhealth.com%2F\u0026twttr_widget=1\u0026twttr_hask=0\u0026twttr_li=0\u0026twttr_pid=v3%3A1356369820120830106696393: 0kb (43ms response time)\n      - http://p.twitter.com/t.gif?_=1356369820542\u0026count=none\u0026id=twitter-widget-0\u0026lang=en\u0026original_referer=http%3A%2F%2Fmappyhealth.com%2F\u0026size=m\u0026text=Check%20out%20%40MappyHealth%20-%20following%20disease%20trends%2C%20140%20characters%20at%20a%20time.%20%23NowTrending2012\u0026url=http%3A%2F%2Fmappyhealth.com%2F\u0026type=share\u0026twttr_referrer=http%3A%2F%2Fmappyhealth.com%2F\u0026twttr_widget=1\u0026twttr_hask=0\u0026twttr_li=0\u0026twttr_pid=: 0kb (43ms response time)\n    + FAVICON: 0kb (over 1 requests)\n      - http://mappyhealth.com/favicon.ico: 0kb (0ms response time)\n    + IFRAME: 85kb (over 2 requests)\n      - http://platform.twitter.com/widgets/follow_button.1355514129.html#_=1356369820551\u0026id=twitter-widget-1\u0026lang=en\u0026screen_name=MappyHealth\u0026show_count=false\u0026show_screen_name=true\u0026size=m: 65kb (67553ms response time)\n      - http://platform.twitter.com/widgets/tweet_button.1355514129.html#_=1356369820542\u0026count=none\u0026id=twitter-widget-0\u0026lang=en\u0026original_referer=http%3A%2F%2Fmappyhealth.com%2F\u0026size=m\u0026text=Check%20out%20%40MappyHealth%20-%20following%20disease%20trends%2C%20140%20characters%20at%20a%20time.%20%23NowTrending2012\u0026url=http%3A%2F%2Fmappyhealth.com%2F: 55kb (57281ms response time)\n\nHonestly not sure if it includes @import support but can definitely be added.\n\n**Code!** at https://github.com/marks/RubyScriptPageLoad\n\n\n**References:**  \n1. http://phantomjs.org/    \n2. https://github.com/marcelduran/yslow/wiki/PhantomJS    \nAlso: http://scriptogr.am/micmath/post/using-phantomjs-to-measure-web-page-performance    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarks%2Frubyscriptpageload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarks%2Frubyscriptpageload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarks%2Frubyscriptpageload/lists"}