You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-11-29 22:58:09 +02:00
* fix Markdown issue 'Headers should be surrounded by blank lines' * fix MD012 * fix MD022 * fix MD026 * fix MD007 * fix MD032 * fix MD038 * fix MD040 * fix MD031 * fix MD034 * fix MD004 * fix new findings * fix MD036 * fix MD038 * fix MD032 * fix MD006
1.3 KiB
1.3 KiB
durationMeasure
Description
This step is used to measure the duration of a set of steps, e.g. a certain stage. The duration is stored in a Map. The measurement data can then be written to an Influx database using step influxWriteData.
!!! tip Measuring for example the duration of pipeline stages helps to identify potential bottlenecks within the deployment pipeline. This then helps to counter identified issues with respective optimization measures, e.g parallelization of tests.
Prerequisites
none
Pipeline configuration
none
Parameters
| parameter | mandatory | default | possible values |
|---|---|---|---|
| script | yes | ||
| measurementName | no | test_duration |
Details:
scriptdefines the global script environment of the Jenkinsfile run. Typicallythisis passed to this parameter. This allows the function to access thecommonPipelineEnvironmentfor storing the measured duration.measurementNamedefines the name of the measurement which is written to the Influx database.
Step configuration
none
Example
durationMeasure (script: this, measurementName: 'build_duration') {
//execute your build
}