paularmstrong / build-tracker

A set of tools to track the size of your build artifacts over time.
https://buildtracker.dev
MIT License
439 stars 27 forks source link

Allow artifact stats to be configurable #14

Open paularmstrong opened 6 years ago

paularmstrong commented 6 years ago

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)
});
eps1lon commented 5 years ago

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.

paularmstrong commented 5 years ago

@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:

eps1lon commented 5 years ago

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.

paularmstrong commented 5 years ago

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

OliverJAsh commented 4 years ago

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 🤔

paularmstrong commented 4 years ago

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.

OliverJAsh commented 4 years ago

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?