build-tracker icon indicating copy to clipboard operation
build-tracker copied to clipboard

Allow artifact stats to be configurable

Open paularmstrong opened this issue 6 years ago • 7 comments

Use case

Not all projects are concerned with gzip sizes of artifacts. For example: native iOS and Android applications.

This is a bit 2.0.0 thinking, but I would still like others to weigh in on how this type of thing might be achieved and/or if it's necessary.

Solution

Artifact stats could be configurable via the server application and passed to the frontend application. The application would then give toggles for each type defined.

It could still default to gzip and stat declaring themselves as bytes and work the same as the application does now:

type ArtifactStats = {
  [key: string]: 'bytes' | 'duration'
};

createServer({
  artifactStats: ({ gzip: 'bytes', stat: 'bytes' }: ArtifactStats)
});

paularmstrong avatar Mar 20 '18 23:03 paularmstrong

Not all projects are concerned with gzip sizes of artifacts.

Not sure if this is the right issue but I'd be interested in tracking arbitrary values. For example tracking benchmark results or lighthouse scores. So far it looks like I can only configure files as artifacts and it automatically assumes I want to track their size.

eps1lon avatar Jun 03 '19 19:06 eps1lon

@eps1lon This is something I'm definitely interested in for Build Tracker!

That being said, it's a pretty big undertaking to think through and not something for the 1.x release. Many moving pieces that I can go into detail with if you'd like to contribute :smile:

paularmstrong avatar Jun 03 '19 20:06 paularmstrong

I have to figure out the whole self-hosting story first. That's a pretty big adoption hurdle compared to solutions that provide the server. But hearing that this is in the scope makes me more motivated to figure it out.

eps1lon avatar Jun 04 '19 06:06 eps1lon

I have to figure out the whole self-hosting story first. Related to #66

paularmstrong avatar Jun 04 '19 13:06 paularmstrong

For the graphs, I noticed that Brotli is the default size type. We don't currently use Brotli so we would like the graphs to default to using gzip instead. Is this an easy change to make?

I noticed we have a sizeKey in Redux state. that defaults to ''. Changing that to 'gzip' didn't seem to do anything 🤔

OliverJAsh avatar Feb 17 '20 19:02 OliverJAsh

The default currently goes to whatever is alphabetically first and can be changed with toggles in the drawer. I think a config option to set default would work.

paularmstrong avatar Feb 17 '20 19:02 paularmstrong

Related to this: I would love to see support for passing a custom quality level to Brotli. (We use the maximum quality level—11.)

Do you think we could support something like that?

OliverJAsh avatar May 11 '20 17:05 OliverJAsh