{"id":17481183,"url":"https://github.com/paratron/cm-stats","last_synced_at":"2025-09-07T04:38:21.548Z","repository":{"id":7655378,"uuid":"9016466","full_name":"Paratron/cm-stats","owner":"Paratron","description":"A remote statistics module for the HTML5 CanvasMark project","archived":false,"fork":false,"pushed_at":"2013-03-25T21:34:25.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-06T20:33:08.637Z","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/Paratron.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":"2013-03-25T21:29:19.000Z","updated_at":"2022-11-26T07:23:03.000Z","dependencies_parsed_at":"2022-09-19T01:32:02.179Z","dependency_job_id":null,"html_url":"https://github.com/Paratron/cm-stats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Paratron/cm-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paratron%2Fcm-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paratron%2Fcm-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paratron%2Fcm-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paratron%2Fcm-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paratron","download_url":"https://codeload.github.com/Paratron/cm-stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paratron%2Fcm-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273997109,"owners_count":25204473,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-18T22:08:48.267Z","updated_at":"2025-09-07T04:38:21.497Z","avatar_url":"https://github.com/Paratron.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"CanvasMark Stats v1\n======================\n\nThis project tries to bring detailed statistics into the CanvasMark 2013 HTML5 benchmark project by Kevin Roast.\n\nIt serves no other purpose but I opensourced it here because maybe somebody wants to grab it and tweak it for his purpose.\n\n\nHow to use cm-stats\n-------------------\n\nAt the very first, you need to include the cm-stats.js file into the website:\n\n    \u003cscript src=\"//social-rockstar/cm-stats/cm-stats.min.js\"\u003e\n\n***Heads up!*** This URL does currently not work since the backend scripts are not ready.\n\n###Initializing a benchmark session\nAfter the benchmark suite has been loaded, you can create a new benchmarking session like so:\n\n    var benchmarkSession = cmStats.startSession();\n\nThis creates a new session object (which you have to keep!) that enables you to store test results.\n\nBy default, the `autoSave` feature is active, which causes cm-stats to send new results directly to the server\nafter each call of `finishTest()` on the session object.\n\nIf you don't want to do this, pass `false` as first argument into the session constructor.\n\n\n###Doing benchmarks\nEvery benchmark test in CanvasMark has to get a unique identifier, so that you can tell cm-stats which test\nhas just been started, even if you add more tests to the suite at any time and/ore shuffle the order.\n\nSo you have to get the current tests key and call this method with it:\n\n    benchmarkSession.startTest('myUniqueTestKey');\n\nAfter this method has been called, cm-stats immediately starts to track how many time passes until the test is finished.\nYou leave your test running until its done and record the resulting score.\n\nAfter the test is done, you call this method, passing the resulting score as an integer:\n\n    benchmarkSession.finishTest(myScore);\n\nIf `autoSave` is active, the result of this test (duration and score) is immediately transfered to the server.\nThe unique test key is used to avoid data garbage and confusion on the serverside. =]\n\n###Fetching final results\nAfter all tests are done, you can request the final results from cm-stats.\n\nTo retrieve the total score of all tests, call:\n\n    var totalScore = benchmarkSession.getTotalScore();\n\nThis returns an integer with the sum of all test scores.\n\nIf you want to know how much time the user spent in all tests, call:\n\n    var totalDuration = benchmarkSession.getTotalDuration();\n\nWhich returns an object with the properties `hours`, `minutes`, `seconds`, and `milliseconds`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparatron%2Fcm-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparatron%2Fcm-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparatron%2Fcm-stats/lists"}