jenkinsci / jenkinsci/benchmark-plugin

Add 'useLastBuidls' feature

Open
#33 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7
Forks
4
PR merge metrics
No merged PRs in 30d

Description

As in the title suggests. It would be beneficial to add `useLastBuilds` option in `benchmark(...)` step, e.g.:
- `useLastBuilds: 0` disables this option, i.e., everything works as currently,
- `useLastBuilds: 15` takes into account (stats computation, etc...) only last 15 builds.
- `useLastBuilds: 15 + 74, 125, 67` takes into account last 15 builds and builds `#74`, `#124` and `#67`. If these additional builds exists, otherwise each non-existing build is ignored. (It could be some deleted build, then it is ignored [obviously] forever or some future build, then it should be taken into account, when it will become available.)

**Possibility of adding individual builds to the used builds list is useful for keeping some old build for reference only (these could be some best/worst builds).**

Spaces around tokens should be ignored.

Data used to compute statistics should be kept indefinitely (i.e., as long as the build itself is kept). It would be useful to have set `useLastBuilds: 10 + 7` at build `#22` to see displayed buids `#7, #13 - #22` and then change it to `useLastBuilds: 25 + 11,13` at build, e.g., `#56` to increase number of last builds to `25` and add builds `#11` and `#13` (if existing) unconditionally, i.e, builds `#11, #13 and #34 - #56` will be visible in the stats panel.

I know that it is possible to use `Discard Old Builds` plugin (or `Enhanced Discard Builds`) in order to achieve the same result, but in some cases it is not applicable. Removing `BenchmarkCondensed.json` also does not help, since it include old builds in the displayed statistics immediately after the next build.

Contributor guide

Open the contributing guide

Research direction

Start by locating the benchmark(...) step and the handling of BenchmarkCondensed.json. Trace how builds are selected for statistics and how missing or future build numbers are treated. Done means the useLastBuilds options, spacing rules, retained historical data, and displayed build ranges behave as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.