getData() {
    // Get memory usage snapshot first (just in case)
    const { rss, heapTotal, heapUsed, external } = process.memoryUsage()
    const memory = {
      rss: rss ?? 0,
      heapTotal: heapTotal ?? 0,
      heapUsed: heapUsed ?? 0,
      external: external ?? 0,
    }

    for (const key in this.timestamps) {
      this.timestamps[key] = Math.floor(this.timestamps[key])
    }

    // For the time being, our target benchmarks are part of the main repo
    // And we will want to know what version of the repo we're testing with
    // This won't work as intended when running a site not in our repo (!)
    const gitHash = execToStr(`git rev-parse HEAD`)
    // Git only supports UTC tz through env var, but the unix time stamp is UTC
    const unixStamp = execToStr(`git show --quiet --date=unix --format="%cd"`)
    const commitTime = new Date(parseInt(unixStamp, 10) * 1000).toISOString()

    const nodejsVersion = process.version

    // This assumes the benchmark is started explicitly from `node_modules/.bin/gatsby`, and not a global install
    // (This is what `gatsby --version` does too, ultimately)
    const gatsbyCliVersion = execToStr(`node_modules/.bin/gatsby --version`)

    const gatsbyVersion = require(`gatsby/package.json`).version

    const sharpVersion = fs.existsSync(`node_modules/sharp/package.json`)
      ? require(`sharp/package.json`).version
      : `none`

    const webpackVersion = require(`webpack/package.json`).version

    const publicJsSize = glob(`public/*.js`).reduce(
      (t, file) => t + fs.statSync(file).size,
      0
    )

    const jpgCount = execToInt(
      `find public .cache  -type f -iname "*.jpg" -or -iname "*.jpeg" | wc -l`
    )

    const pngCount = execToInt(
      `find public .cache  -type f -iname "*.png" | wc -l`
    )

    const gifCount = execToInt(
      `find public .cache  -type f -iname "*.gif" | wc -l`
    )

    const otherCount = execToInt(
      `find public .cache  -type f -iname "*.bmp" -or -iname "*.tif" -or -iname "*.webp" -or -iname "*.svg" | wc -l`
    )

    const benchmarkMetadata = this.getMetadata()

    return {
      time: this.localTime,
      sessionId: process.gatsbyTelemetrySessionId || uuid.v4(),
      cwd: process.cwd() ?? ``,
      timestamps: this.timestamps,
      gitHash,
      commitTime,
      ci: process.env.CI || false,
      ciName: CI_NAME || `local`,
      versions: {
        nodejs: nodejsVersion,
        gatsby: gatsbyVersion,
        gatsbyCli: gatsbyCliVersion,
        sharp: sharpVersion,
        webpack: webpackVersion,
      },
      counts: {
        pages: parseInt(process.env.NUM_PAGES),
        jpgs: jpgCount,
        pngs: pngCount,
        gifs: gifCount,
        other: otherCount,
      },
      memory,
      publicJsSize,
      ...benchmarkMetadata,
    }
  }
If we are running in netlify, environment variables can be attached using the INCOMING_HOOK_BODY
extract the configuration from there