{"_id":"usertiming","_rev":"3115081","name":"usertiming","description":"W3C UserTiming polyfill","dist-tags":{"latest":"0.1.8"},"maintainers":[{"name":"nicjansma","email":"nic@nicj.net"}],"time":{"modified":"2023-11-27T05:50:28.000Z","created":"2013-04-16T02:53:48.239Z","0.1.8":"2016-05-15T11:52:28.157Z","0.1.7":"2015-09-14T17:30:37.350Z","0.1.6":"2015-02-02T14:27:55.941Z","0.1.5":"2015-01-13T06:02:55.226Z","0.1.4":"2014-10-29T00:53:08.014Z","0.1.3":"2014-08-07T10:01:36.722Z","0.1.0":"2013-04-16T02:53:48.239Z"},"users":{},"author":{"name":"Nic Jansma"},"repository":{"type":"git","url":"git+ssh://git@github.com/nicjansma/usertiming.js.git"},"versions":{"0.1.8":{"name":"usertiming","description":"W3C UserTiming polyfill","main":"./src/usertiming","author":{"name":"Nic Jansma"},"version":"0.1.8","repository":{"type":"git","url":"git+ssh://git@github.com/nicjansma/usertiming.js.git"},"bugs":{"url":"http://github.com/nicjansma/usertiming.js/issues"},"license":"MIT","scripts":{"test":"grunt travis --verbose"},"devDependencies":{"expect.js":"^0.3.1","grunt":"^0.4.0","grunt-contrib-clean":"^0.6.0","grunt-contrib-uglify":">0.0.0","grunt-karma":"^0.10.1","grunt-mocha-test":"^0.12.7","gruntify-eslint":"^1.0.1","karma":"^0.12.31","karma-chrome-launcher":"^0.1.5","karma-coverage":"^0.2.6","karma-expect":"^1.1.0","karma-firefox-launcher":"^0.1.4","karma-ie-launcher":"^0.1.5","karma-mocha":"^0.1.9","karma-opera-launcher":"^0.1.0","karma-phantomjs-launcher":"^0.1.4","karma-safari-launcher":"^0.1.1","karma-tap-reporter":"0.0.3","mocha":"^2.1.0"},"gitHead":"c4f15739a8ceea22a57ccd12aa5fbce14c94d456","homepage":"https://github.com/nicjansma/usertiming.js#readme","_id":"usertiming@0.1.8","_shasum":"35378e7f41a248d40e658d05f80423469a7b0650","_from":".","_npmVersion":"3.0.0","_nodeVersion":"5.2.0","_npmUser":{"name":"nicjansma","email":"nic@nicj.net"},"maintainers":[{"name":"nicjansma","email":"nic@nicj.net"}],"dist":{"shasum":"35378e7f41a248d40e658d05f80423469a7b0650","size":56799,"noattachment":false,"key":"/usertiming/-/usertiming-0.1.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/usertiming/download/usertiming-0.1.8.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/usertiming-0.1.8.tgz_1463313146036_0.48897844715975225"},"directories":{},"publish_time":1463313148157,"_hasShrinkwrap":false,"_cnpm_publish_time":1463313148157,"_cnpmcore_publish_time":"2021-12-16T20:20:56.902Z"},"0.1.7":{"name":"usertiming","description":"W3C UserTiming polyfill","main":"./src/usertiming","author":{"name":"Nic Jansma"},"version":"0.1.7","repository":{"type":"git","url":"git+ssh://git@github.com/nicjansma/usertiming.js.git"},"bugs":{"url":"http://github.com/nicjansma/usertiming.js/issues"},"licenses":[{"type":"MIT","url":"http://github.com/nicjansma/usertiming.js/raw/master/LICENSE.txt"}],"scripts":{"test":"grunt travis --verbose"},"devDependencies":{"expect.js":"^0.3.1","grunt":">= 0.4.0","grunt-contrib-clean":"^0.6.0","grunt-contrib-uglify":">0.0.0","grunt-karma":"^0.10.1","grunt-mocha-test":"^0.12.7","gruntify-eslint":">0.0.0","karma":"^0.12.31","karma-chrome-launcher":"^0.1.5","karma-coverage":"^0.2.6","karma-expect":"^1.1.0","karma-firefox-launcher":"^0.1.4","karma-ie-launcher":"^0.1.5","karma-mocha":"^0.1.9","karma-opera-launcher":"^0.1.0","karma-phantomjs-launcher":"^0.1.4","karma-safari-launcher":"^0.1.1","karma-tap-reporter":"0.0.3","mocha":"^2.1.0"},"gitHead":"4d8368299fac268b1ed905eb24378791e157c67f","homepage":"https://github.com/nicjansma/usertiming.js#readme","_id":"usertiming@0.1.7","_shasum":"25e5522c5d1805836b1c0a1d545f4d29889bb37a","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"nicjansma","email":"nic@nicj.net"},"maintainers":[{"name":"nicjansma","email":"nic@nicj.net"}],"dist":{"shasum":"25e5522c5d1805836b1c0a1d545f4d29889bb37a","size":56638,"noattachment":false,"key":"/usertiming/-/usertiming-0.1.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/usertiming/download/usertiming-0.1.7.tgz"},"directories":{},"publish_time":1442251837350,"_hasShrinkwrap":false,"_cnpm_publish_time":1442251837350,"_cnpmcore_publish_time":"2021-12-16T20:20:57.240Z"},"0.1.6":{"name":"usertiming","description":"W3C UserTiming polyfill","main":"./src/usertiming","author":{"name":"Nic Jansma"},"version":"0.1.6","repository":{"type":"git","url":"http://github.com/nicjansma/usertiming.js.git"},"bugs":{"url":"http://github.com/nicjansma/usertiming.js/issues"},"licenses":[{"type":"MIT","url":"http://github.com/nicjansma/usertiming.js/raw/master/LICENSE.txt"}],"scripts":{"test":"grunt travis --verbose"},"devDependencies":{"nodeunit":">0.0.0","uglify-js":"1.2.x","jshint":">0.0.0","grunt":"~0.4.0","grunt-cli":"~0.1.0","grunt-contrib-jshint":">0.0.0","grunt-contrib-nodeunit":">0.0.0","grunt-contrib-uglify":">0.0.0"},"homepage":"https://github.com/nicjansma/usertiming.js","_id":"usertiming@0.1.6","dist":{"shasum":"1cfe1692a6ac6e57baefc2d4adec755e3f3ae58c","size":57745,"noattachment":false,"key":"/usertiming/-/usertiming-0.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/usertiming/download/usertiming-0.1.6.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"nicjansma","email":"nic@nicj.net"},"maintainers":[{"name":"nicjansma","email":"nic@nicj.net"}],"directories":{},"publish_time":1422887275941,"_hasShrinkwrap":false,"_cnpm_publish_time":1422887275941,"_cnpmcore_publish_time":"2021-12-16T20:20:57.748Z"},"0.1.5":{"name":"usertiming","description":"W3C UserTiming polyfill","main":"./src/usertiming","author":{"name":"Nic Jansma"},"version":"0.1.5","repository":{"type":"git","url":"http://github.com/nicjansma/usertiming.js.git"},"bugs":{"url":"http://github.com/nicjansma/usertiming.js/issues"},"licenses":[{"type":"MIT","url":"http://github.com/nicjansma/usertiming.js/raw/master/LICENSE.txt"}],"scripts":{"test":"grunt travis --verbose"},"devDependencies":{"nodeunit":">0.0.0","uglify-js":"1.2.x","jshint":">0.0.0","grunt":"~0.4.0","grunt-cli":"~0.1.0","grunt-contrib-jshint":">0.0.0","grunt-contrib-nodeunit":">0.0.0","grunt-contrib-uglify":">0.0.0"},"gitHead":"d2d15e5ed6e8bd5f712f8ff0c1c254ef362e81aa","homepage":"https://github.com/nicjansma/usertiming.js","_id":"usertiming@0.1.5","_shasum":"891c893865744eacd6f359daa808d85ded8dcadb","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"nicjansma","email":"nic@nicj.net"},"maintainers":[{"name":"nicjansma","email":"nic@nicj.net"}],"dist":{"shasum":"891c893865744eacd6f359daa808d85ded8dcadb","size":57354,"noattachment":false,"key":"/usertiming/-/usertiming-0.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/usertiming/download/usertiming-0.1.5.tgz"},"directories":{},"publish_time":1421128975226,"_hasShrinkwrap":false,"_cnpm_publish_time":1421128975226,"_cnpmcore_publish_time":"2021-12-16T20:20:58.201Z"},"0.1.4":{"name":"usertiming","description":"W3C UserTiming polyfill","main":"./src/usertiming","author":{"name":"Nic Jansma"},"version":"0.1.4","repository":{"type":"git","url":"http://github.com/nicjansma/usertiming.js.git"},"bugs":{"url":"http://github.com/nicjansma/usertiming.js/issues"},"licenses":[{"type":"MIT","url":"http://github.com/nicjansma/usertiming.js/raw/master/LICENSE.txt"}],"scripts":{"test":"grunt travis --verbose"},"devDependencies":{"nodeunit":">0.0.0","uglify-js":"1.2.x","jshint":">0.0.0","grunt":"~0.4.0","grunt-cli":"~0.1.0","grunt-contrib-jshint":">0.0.0","grunt-contrib-nodeunit":">0.0.0","grunt-contrib-uglify":">0.0.0"},"homepage":"https://github.com/nicjansma/usertiming.js","_id":"usertiming@0.1.4","dist":{"shasum":"53463af14e94af421c7fa1af4d5fde838cfe0291","size":57268,"noattachment":false,"key":"/usertiming/-/usertiming-0.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/usertiming/download/usertiming-0.1.4.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"nicjansma","email":"nic@nicj.net"},"maintainers":[{"name":"nicjansma","email":"nic@nicj.net"}],"directories":{},"publish_time":1414543988014,"_hasShrinkwrap":false,"_cnpm_publish_time":1414543988014,"_cnpmcore_publish_time":"2021-12-16T20:20:58.718Z"},"0.1.3":{"name":"usertiming","description":"W3C UserTiming polyfill","main":"./src/usertiming","author":{"name":"Nic Jansma"},"version":"0.1.3","repository":{"type":"git","url":"http://github.com/nicjansma/usertiming.js.git"},"bugs":{"url":"http://github.com/nicjansma/usertiming.js/issues"},"licenses":[{"type":"MIT","url":"http://github.com/nicjansma/usertiming.js/raw/master/LICENSE.txt"}],"scripts":{"test":"grunt travis --verbose"},"devDependencies":{"nodeunit":">0.0.0","uglify-js":"1.2.x","jshint":">0.0.0","grunt":"~0.4.0","grunt-cli":"~0.1.0","grunt-contrib-jshint":">0.0.0","grunt-contrib-nodeunit":">0.0.0","grunt-contrib-uglify":">0.0.0"},"homepage":"https://github.com/nicjansma/usertiming.js","_id":"usertiming@0.1.3","dist":{"shasum":"1e021a0600fccd31aeceab442cb907a69992d2d3","size":57131,"noattachment":false,"key":"/usertiming/-/usertiming-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/usertiming/download/usertiming-0.1.3.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"nicjansma","email":"nic@nicj.net"},"maintainers":[{"name":"nicjansma","email":"nic@nicj.net"}],"directories":{},"publish_time":1407405696722,"_hasShrinkwrap":false,"_cnpm_publish_time":1407405696722,"_cnpmcore_publish_time":"2021-12-16T20:20:59.190Z"},"0.1.0":{"name":"usertiming","description":"W3C UserTiming polyfill","main":"./src/usertiming","author":{"name":"Nic Jansma"},"version":"0.1.0","repository":{"type":"git","url":"http://github.com/nicjansma/usertiming.js.git"},"bugs":{"url":"http://github.com/nicjansma/usertiming.js/issues"},"licenses":[{"type":"MIT","url":"http://github.com/nicjansma/usertiming/raw/master/LICENSE"}],"devDependencies":{"nodeunit":">0.0.0","uglify-js":"1.2.x","jshint":">0.0.0","grunt":"~0.4.0","grunt-contrib-jshint":">0.0.0","grunt-contrib-nodeunit":">0.0.0","grunt-contrib-uglify":">0.0.0"},"readmeFilename":"README.md","_id":"usertiming@0.1.0","dist":{"shasum":"3a64ab049fab772944b21a20a5ad0e0c3300909e","size":55624,"noattachment":false,"key":"/usertiming/-/usertiming-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/usertiming/download/usertiming-0.1.0.tgz"},"_npmVersion":"1.1.69","_npmUser":{"name":"nicjansma","email":"nic@nicj.net"},"maintainers":[{"name":"nicjansma","email":"nic@nicj.net"}],"directories":{},"publish_time":1366080828239,"_hasShrinkwrap":false,"_cnpm_publish_time":1366080828239,"_cnpmcore_publish_time":"2021-12-16T20:21:00.240Z"}},"readme":"# UserTiming.js\n\nv0.1.8\n\nCopyright 2014 Nic Jansma\n\nhttp://nicj.net\n\nLicensed under the MIT license\n\n## Introduction\n\nUserTiming.js is a polyfill that adds [UserTiming](http://www.w3.org/TR/user-timing/) support to browsers\nthat do not natively support it.\n\nUserTiming is accessed via the [PerformanceTimeline](http://www.w3.org/TR/performance-timeline/), and requires\n[``window.performance.now()``](http://www.w3.org/TR/hr-time/) support, so UserTiming.js\nadds a limited version of these interfaces if the browser does not support them (which is likely the case if the browser\ndoes not natively support UserTiming).\n\nAs of 2013-04-15, UserTiming is natively supported by the following browsers:\n\n* IE 10+\n* Chrome 25+ (prefixed)\n\nUserTiming.js has been verified to add UserTiming support to the following browsers:\n\n* IE 6-9\n* Firefox 3.6+ (previous versions not tested)\n* Safari 4.0.5+ (previous versions not tested)\n* Opera 10.50+ (previous versions not tested)\n\nUserTiming.js will detect native implementations of UserTiming, ``window.performance.now()`` and\nthe PerformanceTimeline and will not make any changes if those interfaces already exist.  When a prefixed version\nis found, it is copied over to the unprefixed name.\n\n## Download\n\nReleases are available for download from [GitHub](https://github.com/nicjansma/usertiming.js).\n\n__Development:__ [usertiming.js](https://github.com/nicjansma/usertiming.js/raw/master/src/usertiming.js)\n    - 18.1kb\n\n__Production:__ [usertiming.min.js](https://github.com/nicjansma/usertiming.js/raw/master/dist/usertiming.min.js)\n    - 1,187b (minified / gzipped)\n\nusertiming.js is also available as the [npm usertiming module](https://npmjs.org/package/usertiming). You can install\nusing  Node Package Manager (npm):\n\n    npm install usertiming\n\nusertiming.js is also available via [bower](http://bower.io/). You can install using:\n\n    bower install usertiming\n\n## CDN\n\nusertiming.js is available from the following CDNs:\n\n* [jsdelivr.com](http://www.jsdelivr.com/projects/usertiming.js): [`http://www.jsdelivr.com/projects/usertiming.js`](http://www.jsdelivr.com/projects/usertiming.js)\n* [cdnjs.com](https://cdnjs.com/libraries/usertiming): [`https://cdnjs.com/libraries/usertiming`](https://cdnjs.com/libraries/usertiming)\n\n## Usage\n\nPlease see the [W3C UserTiming API Reference](http://www.w3.org/TR/user-timing/) for details on how to use the\nUserTiming API.\n\nTo include the UserTiming.js polyfill, simply include it via a script tag:\n\n```html\n<script type=\"text/javascript\" src=\"usertiming.min.js\"></script>\n```\n\n## Disadvantages of UserTiming.js over native implementations\n\nUserTiming.js provides a 100% functional JavaScript implementation of UserTiming. However, implementing the API in\nJavaScript has some disadvantages over native (built into the browser) implementations.\n\n1. If the browser does not natively support\n    [DOMHighResolutionTimestamps / ``window.performance.now()``](http://www.w3.org/TR/hr-time/), UserTiming.js adds a\n    small shim (via the `Date` object) to mock this interface. However, DOMHighResolutionTimestamp provides higher\n    precision (0.1 milliseconds or better) than the native `Date` object can (1.0 millisecond -- or worse in older\n    browsers).  So if `window.performance.now()` has to be mocked, it will not be as precise as native implementations.\n\n2. UserTiming marks and measures are queried via the [PerformanceTimeline](http://www.w3.org/TR/performance-timeline/),\n    for example by using `getEntries()`, `getEntriesByType()` or `getEntriesByName()`.  UserTiming.js adds these\n    interfaces so you can query for marks and measures, but they obviously will not support any other PerformanceEntrys\n    such as [ResourceTiming](http://www.w3.org/TR/resource-timing/).\n\n3. UserTiming.js is implemented in JavaScript, so it will be less performant than a native implementation.  If you\n    are calling `mark()` or `measure()` at a high-rate, you might incur a performance cost from the UserTiming.js\n    JavaScript implementation versus a native implementation.\n\n## Tests\n\n### UserTiming.js tests\n\nUserTiming.js tests are provided in the ``test/`` directory, and can be run via ``nodeunit``:\n\n    nodeunit test/test.js\n\nOr via ``grunt``:\n\n    grunt test\n\nThe tests can also be run in a web browser:\n\n    test/test.html\n\n### W3C tests\n\nThe latest [W3C UserTiming tests](http://w3c-test.org/webperf/tests/#ut) (as of 2013-04-15) were copied into the\n``test-w3c/`` directory and can be run in any browser to validate UserTiming.js.  In browsers that natively support\nUserTiming, UserTiming.js does not change anything so the tests will be running against the native browser interface.\n\nThe following changes were made to the W3C test suite to work with UserTiming.js:\n\n* The relative test harness JS/CSS urls were changed to point to the local ``test-w3c/`` directory\n    (such as ``testharness.js``, ``webperftestharness.js``, etc)\n\n* All tests were updated to add a reference to ``../src/usertiming.js`` so usertiming.js is actually used\n\n* ``test_user_timing_measure.htm`` and ``test_user_timing_mark.htm``: The threshold was increased from 20ms to 50ms\n    (due to inefficiencies in the test suite)\n\nAdditional notes:\n\n* ``usertiming.js`` does **not pass** the IDL tests (``idlharness.html``), nor will it ever.\n\n* The W3C test harness itself does not appear to work in several older browsers (IE <= 8, Firefox 3.6, etc).  The\n    UserTiming.js [test cases](#Tests) should cover most of what the W3C tests are doing, and the nodeunit test harness\n    works in these older browsers.\n\n## Version History\n\n* v0.1.0 - 2013-04-15: Initial version\n* v0.1.1 - 2014-02-19: Updated dependencies, grunt lint task, bower package name\n* v0.1.2 - 2014-02-19: Small bower.json fix\n* v0.1.3 - 2014-08-07: Include dist/ dir in bower and npm packages\n* v0.1.4 - 2014-10-28: Fix for Safari iOS 8\n* v0.1.5 - 2015-01-12: Fix for FF 35\n* v0.1.6 - 2015-02-01: Better FF 35 support (or any browser that has RT but not UT)\n* v0.1.7 - 2015-09-14: Dev-only changes: Lint, switched from NodeUnit to Mocha\n* v0.1.8 - 2016-05-15: Fall back to process.hrtime() if available\n","_attachments":{},"homepage":"https://github.com/nicjansma/usertiming.js#readme","bugs":{"url":"http://github.com/nicjansma/usertiming.js/issues"},"license":"MIT"}