{"id":20935750,"url":"https://github.com/ghostery/benchmarks","last_synced_at":"2025-03-13T02:42:55.424Z","repository":{"id":176607396,"uuid":"659174074","full_name":"ghostery/benchmarks","owner":"ghostery","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-11T14:49:51.000Z","size":198,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-19T19:58:21.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/ghostery.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-27T09:28:51.000Z","updated_at":"2024-05-08T04:34:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"9dc588ee-d40d-4eac-bedd-65ba8c5ae1fe","html_url":"https://github.com/ghostery/benchmarks","commit_stats":null,"previous_names":["ghostery/benchmarks"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostery%2Fbenchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostery%2Fbenchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostery%2Fbenchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostery%2Fbenchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostery","download_url":"https://codeload.github.com/ghostery/benchmarks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243330259,"owners_count":20274037,"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-11-18T22:16:13.402Z","updated_at":"2025-03-13T02:42:55.400Z","avatar_url":"https://github.com/ghostery.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ghostery Benchmarks\n\n## How to start?\n\nInstall dependencies\n\n```\nnpm ci\n```\n\nTo run main script which opens 360 websites one by one please follow commands below. Websites are picked based on https://github.com/whotracksme/whotracks.me\n\nStart benchmarks\n\n```\nnpm start\n```\n\nUsage:\n\n```\n--US            site list for US region\n--EU            site list for European region\n--firefox       select Firefox browser\n--chrome        select Chrome browser\n--with-ghostery load Ghostery extension\n```\n\nExample output:\n```\nLOG: Addon temp path:\nLOG: Downloading addon\nLOG: Unpacking addon\nLOG: Addon path:\nINFO: Open websites from for region: EU.\nLOG={\"index\":1,\"url\":\"https://kingoloto.com/subscribe.html\",\"loadTime\":955,\"loadedAt\":\"2023-05-19T02:20:32.748Z\"}\nLOG={\"index\":2,\"url\":\"https://bananalotto.fr/subscribe.html\",\"loadTime\":860,\"loadedAt\":\"2023-05-19T02:20:35.739Z\"}\nLOG={\"index\":359,\"url\":\"https://krunker.io/\",\"loadTime\":2635,\"loadedAt\":\"2023-05-19T02:48:12.686Z\"}\nLOG={\"index\":360,\"url\":\"https://www.virgilio.it/\",\"loadTime\":1433,\"loadedAt\":\"2023-05-19T02:48:17.331Z\"}\n\n```\n\n## Convert the current to power based on the measurements taken from the benchmark\n\nTo measure AC current, Gravity Analog AC Current Sensor was used. All the code to gather current value is available on https://wiki.dfrobot.com/Gravity_Analog_AC_Current_Sensor__SKU_SEN0211_\n\n\nStart calculate\n\n```\nnpm run -- currentToPower\n```\n\n\nExample input:\n```\n10:11:50.121\t0.091\n10:11:50.121\t0.112\n10:11:50.121\t0.104\n10:11:50.125\t0.104\n10:11:50.135\t0.098\n10:11:50.152\t0.097\n10:11:50.152\t0.095\n```\n\n\nExample output:\n```\n[\n  {\n    dataSet: 1,\n    fileName: 'idle/Idle_Set1_ 2023-05-17 22-00-33.txt',\n    AVG: 9.829,\n    AVG_CTP: 9.826,\n    INTEGRAL: 9.829,\n    INTEGRAL_CTP: 9.826,\n    durationInMin: 59.98\n  },\n  {\n    dataSet: 2,\n    fileName: 'idle/Idle_Set2_ 2023-05-17 22-00-33.txt',\n    AVG: 9.004,\n    AVG_CTP: 9.004,\n    INTEGRAL: 9.004,\n    INTEGRAL_CTP: 9.004,\n    durationInMin: 60.00\n  },\n  {\n    dataSet: 28,\n    fileName: 'withoutGhostery/Without_Set8_2023-05-18 20-17-08.txt',\n    AVG: 22.353,\n    AVG_CTP: 15.852,\n    INTEGRAL: 22.353,\n    INTEGRAL_CTP: 15.852,\n    durationInMin: 42.55\n  }\n]\n```\n\n\n\n\n## Based on the collected data from the benchmark, calculate the average time to load URLs\n\nStart read time\n\n```\nnpm run -- readTime\n```\n\nUsage:\n\n```\n--US            site list for US region\n--EU            site list for European region\n```\n\nExample output:\n```\nWith Ghostery\nAverage urls load time:\n{\n  'https://kingoloto.com/subscribe.html': 1242.125,\n  'https://bananalotto.fr/subscribe.html': 1619,\n  'https://www.vogue.com/': 2542.125,\n  'https://krunker.io/': 2627.625,\n  'https://www.virgilio.it/': 1555.75,\n  'https://velvet.hu/': null\n}\nDuration of urls load time for specific set of measurements:\n[\n  'Set withGhostery/2023-05-19T02_20_04.734Z.txt: Load time duration: 27.74 min.',\n  'Set withGhostery/2023-05-19T09_03_26.047Z.txt: Load time duration: 26.93 min.'\n]\nUrls which are broken or not loaded:\n[\n  { url: 'https://gooutdoors.co.uk/', loadTime: null },\n  { url: 'https://dyson.fr/', loadTime: null },\n  { url: 'https://velvet.hu/', loadTime: null }\n]\n\nWithout Ghostery\nAverage urls load time:\n{\n  'https://kingoloto.com/subscribe.html': 3554.889,\n  'https://bananalotto.fr/subscribe.html': 2802.333,\n  'https://satkurier.pl/': 5574.571,\n  'https://www.wexphotovideo.com/': 3290.778,\n  'https://velvet.hu/': null\n}\nDuration of urls load time for specific set of measurements:\n[\n  'Set withoutGhostery/2023-05-18T18_17_18.025Z.txt: Load time duration: 40.98 min.',\n  'Set withoutGhostery/2023-05-19T01_10_12.807Z.txt: Load time duration: 41.84 min.'\n]\nUrls which are broken or not loaded:\n[\n  { url: 'https://agar.io/', loadTime: -1684434429752 },\n  { url: 'https://velvet.hu/', loadTime: null }\n]\n```\n\n## Resolve redirect\n\nMany website will redirect when their TLD is entered to the browser. We use simple curl script to resolve most of the redirects:\n\n```sh\ncat domains.txt | ./resolve-links.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostery%2Fbenchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostery%2Fbenchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostery%2Fbenchmarks/lists"}