Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing SpeedIndex metrics #1597

Closed
julrich opened this issue Apr 29, 2017 · 1 comment
Closed

Missing SpeedIndex metrics #1597

julrich opened this issue Apr 29, 2017 · 1 comment

Comments

@julrich
Copy link

julrich commented Apr 29, 2017

I've got problems getting the SpeedIndex metrics (SpeedIndex, FirstVisualChange, LastVisualChange, PerceptualSpeedIndex, VisuallyComplete, VisualComplete85) for our tests.

The page tested is this one: https://kalenborn.typo3.ruhmesmeile.review (with Basic Authentication kalenborn / betatester).

Configuration as follows:

{
  "budget": {
    "configPath": "/budget-config.json",
    "output": "junit"
  },
  "browsertime": {
    "connectivity": {
      "engine": "external",
      "profile": "cable"
    },
    "iterations": 3,
    "browser": "chrome",
    "speedIndex": true,
    "video": true,
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko; Google Page Speed Insights) Chrome/57.0.2987.133 Safari/537.36"
  },
  "crawler": {
    "depth": 1
  },
  "graphite": {
    "host": "redacted",
    "port": 2003,
    "httpPort": 80,
    "auth": "redacted",
    "namespace": "rm-performance.desktop"
  },
  "gpsi": {
    "key": "redacted"
  },
  "webpagetest": {
    "host": "redacted",
    "key": "redacted",
    "location": "eu-central-1:Chrome",
    "timeout": 1800,
    "private": false,
    "runs": 3,
    "useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko; Google Page Speed Insights) Chrome/57.0.2987.133 Safari/537.36"
  },
  "metrics": {
    "filter": "*+"
  },
  "firstParty": ".ruhmesmeile.review",
  "resultBaseURL": "https://kalenborn.typo3.ruhmesmeile.rocks",
  "gzipHAR": true,
  "video": true
}

Starting the container like this: /usr/bin/docker run --volume /path/to/sitespeedio-config.json:/sitespeedio-config.json --volume /path/to/result:/sitespeed.io/sitespeed-result --volume /path/to/budget-config.json:/budget-config.json --workdir /sitespeed.io --rm --privileged --shm-size=1g sitespeedio/sitespeed.io:5.0.0 --config /sitespeedio-config.json https://kalenborn.typo3.ruhmesmeile.review

I've uploaded some results of this configuration. For some reason, the first -vvv run I've tried exited with an error, just rerunning netted the uploaded -vvv result:

With --debug and -vvv: https://ruhmesmeile.com/fileadmin/ruhmesmeile.com/fileadmin/20170429-kalenborn.typo3.performance-debug-vvv.tar.gz
With -vvv: https://ruhmesmeile.com/fileadmin/20170429-kalenborn.typo3.performance-vvv.tar.gz

The error when first running with -vvv was this one:

[2017-04-29 21:30:57] ERROR: [sitespeedio] TypeError: /usr/src/app/lib/plugins/html/templates/pages.pug:16
    14|       +numberCell('Requests', p.requests)
    15|       if options.speedIndex
  > 16|         +numberCell('First Visual Change', b.visualMetrics[0].FirstVisualChange)
    17|         +numberCell('Speed Index', b.visualMetrics[0].SpeedIndex)
    18|         +numberCell('Last Visual Change', b.visualMetrics[0].LastVisualChange)
    19|       else

Cannot read property '0' of undefined
    14|       +numberCell('Requests', p.requests)
    15|       if options.speedIndex
  > 16|         +numberCell('First Visual Change', b.visualMetrics[0].FirstVisualChange)
    17|         +numberCell('Speed Index', b.visualMetrics[0].SpeedIndex)
    18|         +numberCell('Last Visual Change', b.visualMetrics[0].LastVisualChange)
    19|       else

Cannot read property '0' of undefined
    at Object.eval (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:175:64)
    at Object.pug_interp [as rows] (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:209:4)
    at eval (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:356:19)
    at template (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:389:184)
    at Object.renderTemplate (/usr/src/app/lib/plugins/html/renderer.js:28:37)
    at HTMLBuilder._renderSummaryPage (/usr/src/app/lib/plugins/html/htmlBuilder.js:219:67)
    at Object.keys.map (/usr/src/app/lib/plugins/html/htmlBuilder.js:113:27)
    at Array.map (native)
    at HTMLBuilder.render (/usr/src/app/lib/plugins/html/htmlBuilder.js:113:8)
    at Object.close (/usr/src/app/lib/plugins/html/index.js:21:29)
    at Promise.resolve.filter.map (/usr/src/app/lib/sitespeed.js:45:49)
From previous event:
    at runOptionalFunction (/usr/src/app/lib/sitespeed.js:45:6)
    at runOptionalFunction.then.then.tap (/usr/src/app/lib/sitespeed.js:121:32)
From previous event:
    at loader.loadPlugins.then (/usr/src/app/lib/sitespeed.js:121:16)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)
From previous event:
    at storageManager.createDataDir.then.then.then.then.then (/usr/src/app/lib/sitespeed.js:103:12)
From previous event:
    at Object.run (/usr/src/app/lib/sitespeed.js:100:8)
    at Object.<anonymous> (/usr/src/app/bin/sitespeed.js:29:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

Maybe you can glean something from those?

@julrich
Copy link
Author

julrich commented May 1, 2017

The metrics were missing as a result of the container running the scan not having sufficient RAM, resulting in the rendered video being short / empty, and visualMetrics.py not being able to determine the correct SpeedIndex as a result.

Increased the RAM on the host (switched host, to be precise), and the problem is gone!

@julrich julrich closed this as completed May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant