{"_id":"speedline-core","_rev":"478064","name":"speedline-core","description":"Get the speed index from chrome dev tool timeline files","dist-tags":{"latest":"1.4.3"},"maintainers":[{"name":"patrickhulce","email":"patrick.hulce@gmail.com"},{"name":"paulirish","email":""}],"time":{"modified":"2021-08-05T09:23:21.000Z","created":"2018-08-07T19:39:15.985Z","1.4.3":"2020-07-28T16:37:35.873Z","1.4.2":"2018-09-20T03:02:43.962Z","1.4.0":"2018-08-07T19:39:15.985Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/paulirish/speedline.git"},"versions":{"1.4.3":{"name":"speedline-core","version":"1.4.3","description":"Get the speed index from chrome dev tool timeline files","license":"MIT","repository":{"type":"git","url":"git+https://github.com/paulirish/speedline.git"},"main":"lib","engines":{"node":">=8.0"},"scripts":{"lint":"xo","unit":"ava","test":"yarn run lint && yarn run unit"},"types":"speedline.d.ts","keywords":["chrome","devtools","timeline","speed","index","performance"],"dependencies":{"@types/node":"*","image-ssim":"^0.2.0","jpeg-js":"^0.4.1"},"devDependencies":{"ava":"^0.19.1","xo":"^0.14.0"},"bugs":{"url":"https://github.com/paulirish/speedline/issues"},"homepage":"https://github.com/paulirish/speedline#readme","_id":"speedline-core@1.4.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"patrickhulce","email":"patrick.hulce@gmail.com"},"dist":{"shasum":"4d6e7276e2063c2d36a375cb25a523ac73475319","size":39469,"noattachment":false,"key":"/speedline-core/-/speedline-core-1.4.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/speedline-core/download/speedline-core-1.4.3.tgz"},"maintainers":[{"name":"patrickhulce","email":"patrick.hulce@gmail.com"},{"name":"paulirish","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/speedline-core_1.4.3_1595954255764_0.3529385489030701"},"_hasShrinkwrap":false,"publish_time":1595954255873,"_cnpm_publish_time":1595954255873},"1.4.2":{"name":"speedline-core","version":"1.4.2","description":"Get the speed index from chrome dev tool timeline files","license":"MIT","repository":{"type":"git","url":"git+https://github.com/paulirish/speedline.git"},"main":"lib","engines":{"node":">=5.0"},"scripts":{"lint":"xo","unit":"ava","test":"yarn run lint && yarn run unit"},"types":"speedline.d.ts","keywords":["chrome","devtools","timeline","speed","index","performance"],"dependencies":{"@types/node":"*","image-ssim":"^0.2.0","jpeg-js":"^0.1.2"},"devDependencies":{"ava":"^0.19.1","xo":"^0.14.0"},"bugs":{"url":"https://github.com/paulirish/speedline/issues"},"homepage":"https://github.com/paulirish/speedline#readme","_id":"speedline-core@1.4.2","_npmVersion":"6.1.0","_nodeVersion":"8.11.1","_npmUser":{"name":"paulirish","email":"paul.irish@gmail.com"},"dist":{"shasum":"bb061444a218d67b4cd52f63a262386197b90c8a","size":39352,"noattachment":false,"key":"/speedline-core/-/speedline-core-1.4.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/speedline-core/download/speedline-core-1.4.2.tgz"},"maintainers":[{"name":"patrickhulce","email":"patrick.hulce@gmail.com"},{"name":"paulirish","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/speedline-core_1.4.2_1537412563706_0.7714217737410105"},"_hasShrinkwrap":false,"publish_time":1537412563962,"_cnpm_publish_time":1537412563962},"1.4.0":{"name":"speedline-core","version":"1.4.0","description":"Get the speed index from chrome dev tool timeline files","license":"MIT","repository":{"type":"git","url":"git+https://github.com/paulirish/speedline.git"},"main":"lib","engines":{"node":">=5.0"},"scripts":{"lint":"xo","unit":"ava","test":"yarn run lint && yarn run unit"},"types":"speedline.d.ts","keywords":["chrome","devtools","timeline","speed","index","performance"],"dependencies":{"@types/node":"*","image-ssim":"^0.2.0","jpeg-js":"^0.1.2"},"devDependencies":{"ava":"^0.19.1","xo":"^0.14.0"},"bugs":{"url":"https://github.com/paulirish/speedline/issues"},"homepage":"https://github.com/paulirish/speedline#readme","_id":"speedline-core@1.4.0","_npmVersion":"6.3.0","_nodeVersion":"10.4.1","_npmUser":{"name":"paulirish","email":"paul.irish@gmail.com"},"dist":{"shasum":"884831eaef66ddc928dd7d4c9e844c5d28bad7db","size":7557360,"noattachment":false,"key":"/speedline-core/-/speedline-core-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/speedline-core/download/speedline-core-1.4.0.tgz"},"maintainers":[{"name":"patrickhulce","email":"patrick.hulce@gmail.com"},{"name":"paulirish","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/speedline-core_1.4.0_1533670755316_0.12319963676755119"},"_hasShrinkwrap":false,"publish_time":1533670755985,"_cnpm_publish_time":1533670755985}},"readme":"# speedline-core\n\nThis is the core module for speedline, without any CLI dependencies. See [speedline](https://github.com/paulirish/speedline) for the CLI.\n\n### Install\n\n```bash\n$ npm install speedline\n```\n\n### Usage\n\n```js\nconst speedline = require('speedline-core');\n\nspeedline('./timeline').then(results => {\n  console.log('Speed Index value:', results.speedIndex);\n});\n```\n\n### API\n\n#### `speedline(timeline [, opts])`\n\n* (string | object[]) `timeline`\n* (object) `opts`\n\nReturns a (Promise) resolving with an object containing:\n  * `beginning` (number) - Recording start timestamp\n  * `end` (number) - Recording end timestamp\n  * `speedIndex` (number) - speed index value.\n  * `perceptualSpeedIndex` (number) - perceptual speed index value.\n  * `first` (number) - duration before the first visual change in ms.\n  * `complete` (number) - duration before the last visual change in ms.\n  * `duration` (number) - timeline recording duration in ms.\n  * `frames` ([Frame](#frame)[]) - array of all the frames extracted from the timeline.\n\n**`timeline` parameter**:\n* `string` - the parameter represents the location of the of file containing the timeline.\n* `array` - the parameter represents the traceEvents content of the timeline file.\n\n**`opts` parameter**:\n* `timeOrigin`: Provides the baseline timeStamp, typically navigationStart. Must be a monotonic clock timestamp that matches the trace.  E.g. `speedline('trace.json', {timeOrigin: 103205446186})`\n* `fastMode`: If the elapsed time and difference in similarity between two screenshots are small, fastMode will skip decoding and evaluating the frames between them.\n* `include`: Specifies which speed indexes to compute, can be one of `all|speedIndex|perceptualSpeedIndex`, defaults to `all`.\n\n#### `Frame`\n\nObject representing a single screenshot.\n\n* `frame.getHistogram()`: (number[][]) - returns the frame histogram. Note that light pixels informations are removed from the histogram, for better speed index calculation accuracy.\n* `frame.getTimeStamp()`: (number) - return the frame timestamp.\n* `frame.getImage()`: (Buffer) - return the frame content.\n* `frame.getProgress()`: (number) - return the frame visual progress.\n* `frame.getPerceptualProgress()`: (number) - return the frame perceptual visual progress.\n\n\n## License\n\nMIT © [Pierre-Marie Dartus](https://github.com/pmdartus)\n","_attachments":{},"homepage":"https://github.com/paulirish/speedline#readme","bugs":{"url":"https://github.com/paulirish/speedline/issues"},"license":"MIT"}