forked from cmu-db/noisepage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile-nightly
123 lines (106 loc) · 5.08 KB
/
Jenkinsfile-nightly
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
def utils // common build functions are loaded from Jenkinsfile-utils into this object
String utilsFileName = 'Jenkinsfile-utils'
pipeline {
agent none
environment {
//Do not change.
//Performance Storage Service(Django) authentication information. The credentials can only be changed on Jenkins webpage
PSS_CREATOR = credentials('pss-creator')
}
options {
buildDiscarder(logRotator(daysToKeepStr: '30'))
parallelsAlwaysFailFast()
}
triggers {
cron('H H(2-3) * * *')
}
stages {
stage('Artifact Stats') {
agent {
docker {
image 'noisepage:focal'
}
}
steps {
sh 'echo $NODE_NAME'
// The following command compiles and builds the binary without caching and times the whole operation.
// The time gets output to a file which an artifact stats collector reads, in order to report the metrics.
script {
utils = utils ?: load(utilsFileName)
utils.noisePageBuild(useCache:false, buildType:utils.RELEASE_BUILD, isBuildTests:false, isRecordTime:true)
}
sh script: '''
cd build
python3 ../script/testing/artifact_stats/run_artifact_stats.py --publish-results=prod --publish-username=${PSS_CREATOR_USR} --publish-password=${PSS_CREATOR_PSW}
''', label: 'Artifact Stats'
}
post {
cleanup {
deleteDir()
}
}
}
stage('Performance') {
agent { label 'benchmark' }
steps {
sh 'echo $NODE_NAME'
script{
utils = utils ?: load(utilsFileName)
utils.noisePageBuild(buildType:utils.RELEASE_BUILD, isBuildTests:false)
}
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
catchError(stageResult: 'Failure'){
sh script:'''
cd build
timeout 3h python3 ../script/testing/oltpbench/run_oltpbench.py --config-file=../script/testing/oltpbench/configs/nightly/nightly.json --build-type=release --publish-results=prod --publish-username=${PSS_CREATOR_USR} --publish-password=${PSS_CREATOR_PSW}
''', label: 'OLTPBench (HDD WAL)'
}
catchError(stageResult: 'Failure'){
sh script:'''
cd build
timeout 3h python3 ../script/testing/oltpbench/run_oltpbench.py --config-file=../script/testing/oltpbench/configs/nightly/nightly_ramdisk.json --build-type=release --publish-results=prod --publish-username=${PSS_CREATOR_USR} --publish-password=${PSS_CREATOR_PSW}
''', label: 'OLTPBench (RamDisk WAL)'
}
catchError(stageResult: 'Failure'){
sh script:'''
cd build
timeout 3h python3 ../script/testing/oltpbench/run_oltpbench.py --config-file=../script/testing/oltpbench/configs/nightly/nightly_wal_disabled.json --build-type=release --publish-results=prod --publish-username=${PSS_CREATOR_USR} --publish-password=${PSS_CREATOR_PSW}
''', label: 'OLTPBench (No WAL)'
}
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
archiveArtifacts(artifacts: 'build/oltp_result/**/*.*', excludes: 'build/oltp_result/**/*.csv', fingerprint: true)
}
post {
cleanup {
deleteDir()
}
}
}
stage('Microbenchmark') {
agent { label 'benchmark' }
steps {
sh 'echo $NODE_NAME'
script{
utils = utils ?: load(utilsFileName)
utils.noisePageBuild(buildType:utils.RELEASE_BUILD, isBuildTests:false, isBuildBenchmarks:true)
}
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
// The micro_bench configuration has to be consistent because we currently check against previous runs with the same config
// # of Threads: 4
// WAL Path: Ramdisk
sh script:'''
cd script/testing
python3 microbench/run_microbench.py --num-threads=4 --benchmark-path $(pwd)/../../build/benchmark --logfile-path=/mnt/ramdisk/benchmark.log --publish-results=prod --publish-username=${PSS_CREATOR_USR} --publish-password=${PSS_CREATOR_PSW}
''', label:'Microbenchmark'
archiveArtifacts 'script/testing/*.json'
junit 'script/testing/*.xml'
sh script: 'sudo lsof -i -P -n | grep LISTEN || true', label: 'Check ports.'
}
post {
cleanup {
deleteDir()
}
}
}
}
}