Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Compile metrics about bundling process #969

Open
eduardoboucas opened this issue Jan 28, 2022 · 1 comment
Open

Compile metrics about bundling process #969

eduardoboucas opened this issue Jan 28, 2022 · 1 comment
Labels
action_item action item for an incident type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@eduardoboucas
Copy link
Member

Netlify Build shows the duration of the functions bundling process, but we have no granular view that allows us to see where that time is spent across the various functions and the different stages of the process.

This capability would allow developers to identify (and potentially self-serve solutions for) offenders in a slow bundling process, and it would allow us to better troubleshoot problems like #968.

I propose a new metadata object to be returned by zipFunction and zipFunctions, containing a metrics array of tasks and their duration. Something like:

{
  "metadata": {
    "metrics": [
      {
        "function": "function-1",
        "stage": "discovery",
        "duration": 123
      },
      {
        "function": "function-1",
        "stage": "parsing",
        "duration": 234
      },
      {
        "function": "function-1",
        "stage": "isc",
        "duration": 345
      },
      {
        "function": "function-1",
        "stage": "traversing",
        "duration": 456
      },
      {
        "function": "function-1",
        "stage": "zipping",
        "duration": 567
      }
    ]
  }
}

Netlify Build could then print this object when the verbose mode is enabled.

@eduardoboucas eduardoboucas added type: feature code contributing to the implementation of a feature and/or user facing functionality action_item action item for an incident labels Jan 28, 2022
@ehmicky
Copy link
Contributor

ehmicky commented Jan 28, 2022

Nice idea!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action_item action item for an incident type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

2 participants