-
Notifications
You must be signed in to change notification settings - Fork 1
/
sched-tests-speedometer.jenkinsfile
101 lines (97 loc) · 3.04 KB
/
sched-tests-speedometer.jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
pipeline {
agent { label params.NODE }
parameters {
string(name: 'NODE', defaultValue: '', description: 'The DUT to run on. Must be Android based DUT.')
string(name: 'DESCRIPTION', defaultValue: '', description: 'Describe your experiment so that we have a meaningful name for this run to return to')
booleanParam(name: 'COLLECT_PELT', defaultValue: false, description: 'Collect PELT data and produce plots')
booleanParam(name: 'COLLECT_UCLAMP', defaultValue: false, description: 'Collect UCLAMP data and produce plots')
string(name: 'BRANCH', defaultValue: "${MYCI_BRANCH}", description: 'Which branch to run from? For power users experimenting/developing new changes.')
booleanParam(name: 'RUN_DEX2OAT', defaultValue: false, description: "Run JIT compilation of all apps as a noisy background activity while running the test. We'll honour the specified ITERATIONS and DELAY params.")
string(name: 'ITERATIONS', defaultValue: '3', description: 'Number of iterations to run')
string(name: 'DELAY', defaultValue: '10', description: 'Time in seconds to wait between each run.')
}
environment {
MYCI_BRANCH = "${BRANCH}"
}
options {
buildDiscarder logRotator(artifactDaysToKeepStr: '7', artifactNumToKeepStr: '10', daysToKeepStr: '7', numToKeepStr: '10')
}
stages {
stage('Init') {
steps {
library "sched-tests-utils@${MYCI_BRANCH}"
verify_params(!env.COLLECT_PELT || !env.COLLECT_UCLAMP)
set_description()
}
}
stage('Connect') {
steps {
verify_android()
connect()
android_wakeup_device()
}
}
stage('Prepare Agenda') {
steps {
fixup_agenda("agendas/speedometer.yaml", "ITERATIONS", env.ITERATIONS)
fixup_agenda("agendas/speedometer.yaml", "DELAY", env.DELAY)
fixup_agenda("agendas/speedometer.yaml", "DEVICE", env.ANDROID_SERIAL)
}
}
stage('Run') {
parallel {
stage('Speedometer-WA') {
steps {
start_perfetto("speedometer")
run_wa("agendas/speedometer.yaml")
stop_perfetto()
}
}
stage('dex2oat of all packages') {
when {
expression {
return env.RUN_DEX2OAT == 'true';
}
}
steps {
run_dex2oat_parallel()
}
}
stage('(Workaround)') {
steps {
sleep 3
}
}
}
}
stage('Generate Plots') {
steps {
plot_wa_results(params.NODE, "speedometer")
plot_jank()
plot_pelt(env.COLLECT_PELT == 'true', "speedometer")
plot_uclamp(env.COLLECT_UCLAMP == 'true', "speedometer")
}
}
stage('tar wa_output') {
steps {
tar_wa_output()
}
}
stage('Archive') {
steps {
archiveArtifacts artifacts: '*.tar.xz', followSymlinks: false
archiveArtifacts artifacts: '*.png', followSymlinks: false
archiveArtifacts artifacts: '*.csv', followSymlinks: false, allowEmptyArchive: true
archiveArtifacts artifacts: 'wa_output/results.csv', followSymlinks: false, allowEmptyArchive: true
archiveArtifacts artifacts: '*.perfetto-trace', followSymlinks: false, allowEmptyArchive: true
}
}
}
post {
always {
android_doze_device()
disconnect()
cleanWs()
}
}
}