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

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 join this conversation on GitHub. Already have an account? Sign in to comment
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