In addition to running our tests, CI collects metrics about the Kibana build. These metrics are sent to an external service to track changes over time, and to provide PR authors insights into the impact of their changes.
These metrics help contributors know how they are impacting the size of the bundles Kibana creates, and help make sure that Kibana loads as fast as possible.
page load bundle size
The size of the entry file produced for each bundle/plugin. This file is always loaded on every page load, so it should be as small as possible. To reduce this metric you can put any code that isn’t necessary on every page load behind an
Code that is shared statically with other plugins will contribute to the
page load bundle sizeof that plugin. This includes exports from the
public/index.tsfile and any file referenced by the
async chunks size
An "async chunk" is created for the files imported by each
async import()statement. This metric tracks the sum size of these chunks, in bytes, broken down by plugin/bundle id. You can think of this as the amount of code users will have to download if they access all the components/applications within a bundle.
miscellaneous assets size
- A "miscellaneous asset" is anything that isn’t an async chunk or entry chunk, often images. This metric tracks the sum size of these assets, in bytes, broken down by plugin/bundle id.
@kbn/optimizer bundle module count
The number of separate modules included in each bundle/plugin. This is the best indicator we have for how long a specific bundle will take to be built by the
@kbn/optimizer, so we report it to help people know when they’ve imported a module which might include a surprising number of sub-modules.
The size of the Kibana distributable is an essential metric as it not only contributes to the time it takes to download, but it also impacts time it takes to extract the archive once downloaded.
There are several metrics that we don’t report on PRs because gzip-compression produces different file sizes even when provided the same input, so this metric would regularly show changes even though PR authors hadn’t made any relevant changes.
All metrics are collected from the
tar.gz archive produced for the linux platform.
distributable file count
- The number of files included in the default distributable.
oss distributable file count
- The number of files included in the OSS distributable.
- The size, in bytes, of the default distributable. (not reported on PRs)
oss distributable size
- The size, in bytes, of the OSS distributable. (not reported on PRs)
Elasticsearch limits the number of fields in an index to 1000 by default, and we want to avoid raising that limit.