Skip to content

Commit 55aed9e

Browse files
JSOBotMonssafToukal
authored andcommitted
Setting up benchmarks (#1)
* adding/updating file: push_benchmarks.sh * adding/updating file: benchmark/run_benchmarks.jl * adding/updating file: benchmark/send_comment_to_pr.jl * adding/updating file: Jenkinsfile * setting up project.toml for benchmarks * Add token to jenkinsfile authored-by: Monssaf Toukal <tmonssaf@gmail.com>
1 parent 63b023d commit 55aed9e

File tree

7 files changed

+611
-0
lines changed

7 files changed

+611
-0
lines changed

Jenkinsfile

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
def bmarkFile = 'run_benchmarks.jl'
2+
def prNumber = BRANCH_NAME.tokenize("PR-")[0]
3+
pipeline {
4+
agent any
5+
environment {
6+
REPO_EXISTS = fileExists "$repo"
7+
}
8+
options {
9+
skipDefaultCheckout true
10+
}
11+
triggers {
12+
GenericTrigger(
13+
genericVariables: [
14+
[
15+
key: 'action',
16+
value: '$.action',
17+
expressionType: 'JSONPath', //Optional, defaults to JSONPath
18+
regexpFilter: '[^(created)]', //Optional, defaults to empty string
19+
defaultValue: '' //Optional, defaults to empty string
20+
],
21+
[
22+
key: 'comment',
23+
value: '$.comment.body',
24+
expressionType: 'JSONPath', //Optional, defaults to JSONPath
25+
regexpFilter: '', //Optional, defaults to empty string
26+
defaultValue: '' //Optional, defaults to empty string
27+
],
28+
[
29+
key: 'org',
30+
value: '$.organization.login',
31+
expressionType: 'JSONPath', //Optional, defaults to JSONPath
32+
regexpFilter: '', //Optional, defaults to empty string
33+
defaultValue: 'JuliaSmoothOptimizers' //Optional, defaults to empty string
34+
],
35+
[
36+
key: 'pullrequest',
37+
value: '$.issue.number',
38+
expressionType: 'JSONPath', //Optional, defaults to JSONPath
39+
regexpFilter: '[^0-9]', //Optional, defaults to empty string
40+
defaultValue: '' //Optional, defaults to empty string
41+
],
42+
[
43+
key: 'repo',
44+
value: '$.repository.name',
45+
expressionType: 'JSONPath', //Optional, defaults to JSONPath
46+
regexpFilter: '', //Optional, defaults to empty string
47+
defaultValue: '' //Optional, defaults to empty string
48+
]
49+
],
50+
51+
causeString: 'Triggered on $comment',
52+
53+
token: "JSOTemplate",
54+
55+
printContributedVariables: true,
56+
printPostContent: true,
57+
58+
silentResponse: false,
59+
60+
regexpFilterText: '$comment $pullrequest',
61+
regexpFilterExpression: '@JSOBot runbenchmarks( .*\\.jl)? ' + prNumber
62+
)
63+
}
64+
stages {
65+
stage('clone repo') {
66+
when {
67+
expression { REPO_EXISTS == 'false' }
68+
}
69+
steps {
70+
sh 'git clone https://${GITHUB_AUTH}@github.com/$org/$repo.git'
71+
}
72+
}
73+
stage('checkout on new branch') {
74+
steps {
75+
dir(WORKSPACE + "/$repo") {
76+
sh '''
77+
git clean -fd
78+
git checkout main
79+
git pull origin main
80+
git fetch origin
81+
LOCAL_BRANCH_NAME="temp_bmark"
82+
git branch -D $LOCAL_BRANCH_NAME || true
83+
git fetch origin pull/$pullrequest/head:$LOCAL_BRANCH_NAME
84+
git checkout $LOCAL_BRANCH_NAME --
85+
'''
86+
}
87+
}
88+
}
89+
stage('run benchmarks') {
90+
steps {
91+
script {
92+
def data = env.comment.tokenize(' ')
93+
if (data.size() > 2) {
94+
bmarkFile = data.get(2);
95+
}
96+
}
97+
dir(WORKSPACE + "/$repo") {
98+
sh "mkdir -p $HOME/benchmarks/${org}/${repo}"
99+
sh "qsub -N ${repo}_${pullrequest} -V -cwd -o $HOME/benchmarks/${org}/${repo}/${pullrequest}_${BUILD_NUMBER}_bmark_output.log -e $HOME/benchmarks/${org}/${repo}/${pullrequest}_${BUILD_NUMBER}_bmark_error.log push_benchmarks.sh $bmarkFile"
100+
}
101+
}
102+
}
103+
}
104+
post {
105+
success {
106+
echo "SUCCESS!"
107+
}
108+
cleanup {
109+
dir(WORKSPACE + "/$repo") {
110+
sh 'printenv'
111+
sh '''
112+
git clean -fd
113+
git checkout main
114+
'''
115+
}
116+
}
117+
}
118+
}
119+

benchmark/Manifest.toml

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
# This file is machine-generated - editing it directly is not advised
2+
3+
[[ArgParse]]
4+
deps = ["Logging", "TextWrap"]
5+
git-tree-sha1 = "3102bce13da501c9104df33549f511cd25264d7d"
6+
uuid = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
7+
version = "1.1.4"
8+
9+
[[ArgTools]]
10+
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
11+
12+
[[Artifacts]]
13+
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
14+
15+
[[Base64]]
16+
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
17+
18+
[[Dates]]
19+
deps = ["Printf"]
20+
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
21+
22+
[[Downloads]]
23+
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
24+
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
25+
26+
[[Expat_jll]]
27+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
28+
git-tree-sha1 = "b3bfd02e98aedfa5cf885665493c5598c350cd2f"
29+
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
30+
version = "2.2.10+0"
31+
32+
[[Gettext_jll]]
33+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"]
34+
git-tree-sha1 = "8c14294a079216000a0bdca5ec5a447f073ddc9d"
35+
uuid = "78b55507-aeef-58d4-861c-77aaff3498b1"
36+
version = "0.20.1+7"
37+
38+
[[Git]]
39+
deps = ["Git_jll"]
40+
git-tree-sha1 = "d7bffc3fe097e9589145493c08c41297b457e5d0"
41+
uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
42+
version = "1.2.1"
43+
44+
[[GitHub]]
45+
deps = ["Base64", "Dates", "HTTP", "JSON", "MbedTLS", "Sockets", "SodiumSeal"]
46+
git-tree-sha1 = "a4f61fc1b1724e6eec1d9333eac2d4b01d8fcc8f"
47+
uuid = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26"
48+
version = "5.4.0"
49+
50+
[[Git_jll]]
51+
deps = ["Artifacts", "Expat_jll", "Gettext_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Pkg", "Zlib_jll"]
52+
git-tree-sha1 = "33be385f3432a5a5b7f6965af9592d4407f3167f"
53+
uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
54+
version = "2.31.0+0"
55+
56+
[[HTTP]]
57+
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "NetworkOptions", "Sockets", "URIs"]
58+
git-tree-sha1 = "86ed84701fbfd1142c9786f8e53c595ff5a4def9"
59+
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
60+
version = "0.9.10"
61+
62+
[[IniFile]]
63+
deps = ["Test"]
64+
git-tree-sha1 = "098e4d2c533924c921f9f9847274f2ad89e018b8"
65+
uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f"
66+
version = "0.5.0"
67+
68+
[[InteractiveUtils]]
69+
deps = ["Markdown"]
70+
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
71+
72+
[[JLLWrappers]]
73+
deps = ["Preferences"]
74+
git-tree-sha1 = "642a199af8b68253517b80bd3bfd17eb4e84df6e"
75+
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
76+
version = "1.3.0"
77+
78+
[[JSON]]
79+
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
80+
git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4"
81+
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
82+
version = "0.21.1"
83+
84+
[[LibCURL]]
85+
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
86+
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
87+
88+
[[LibCURL_jll]]
89+
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
90+
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
91+
92+
[[LibGit2]]
93+
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
94+
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
95+
96+
[[LibSSH2_jll]]
97+
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
98+
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
99+
100+
[[Libdl]]
101+
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
102+
103+
[[Libiconv_jll]]
104+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
105+
git-tree-sha1 = "42b62845d70a619f063a7da093d995ec8e15e778"
106+
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
107+
version = "1.16.1+1"
108+
109+
[[Logging]]
110+
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
111+
112+
[[Markdown]]
113+
deps = ["Base64"]
114+
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
115+
116+
[[MbedTLS]]
117+
deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"]
118+
git-tree-sha1 = "1c38e51c3d08ef2278062ebceade0e46cefc96fe"
119+
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
120+
version = "1.0.3"
121+
122+
[[MbedTLS_jll]]
123+
deps = ["Artifacts", "Libdl"]
124+
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
125+
126+
[[Mmap]]
127+
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
128+
129+
[[MozillaCACerts_jll]]
130+
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
131+
132+
[[NetworkOptions]]
133+
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
134+
135+
[[OpenSSL_jll]]
136+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
137+
git-tree-sha1 = "15003dcb7d8db3c6c857fda14891a539a8f2705a"
138+
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
139+
version = "1.1.10+0"
140+
141+
[[PCRE2_jll]]
142+
deps = ["Artifacts", "Libdl"]
143+
uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"
144+
145+
[[Parsers]]
146+
deps = ["Dates"]
147+
git-tree-sha1 = "c8abc88faa3f7a3950832ac5d6e690881590d6dc"
148+
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
149+
version = "1.1.0"
150+
151+
[[Pkg]]
152+
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
153+
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
154+
155+
[[Preferences]]
156+
deps = ["TOML"]
157+
git-tree-sha1 = "00cfd92944ca9c760982747e9a1d0d5d86ab1e5a"
158+
uuid = "21216c6a-2e73-6563-6e65-726566657250"
159+
version = "1.2.2"
160+
161+
[[Printf]]
162+
deps = ["Unicode"]
163+
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
164+
165+
[[REPL]]
166+
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
167+
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
168+
169+
[[Random]]
170+
deps = ["Serialization"]
171+
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
172+
173+
[[SHA]]
174+
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
175+
176+
[[Serialization]]
177+
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
178+
179+
[[Sockets]]
180+
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
181+
182+
[[SodiumSeal]]
183+
deps = ["Base64", "Libdl", "libsodium_jll"]
184+
git-tree-sha1 = "80cef67d2953e33935b41c6ab0a178b9987b1c99"
185+
uuid = "2133526b-2bfb-4018-ac12-889fb3908a75"
186+
version = "0.1.1"
187+
188+
[[TOML]]
189+
deps = ["Dates"]
190+
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
191+
192+
[[Tar]]
193+
deps = ["ArgTools", "SHA"]
194+
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
195+
196+
[[Test]]
197+
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
198+
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
199+
200+
[[TextWrap]]
201+
git-tree-sha1 = "9250ef9b01b66667380cf3275b3f7488d0e25faf"
202+
uuid = "b718987f-49a8-5099-9789-dcd902bef87d"
203+
version = "1.0.1"
204+
205+
[[URIs]]
206+
git-tree-sha1 = "97bbe755a53fe859669cd907f2d96aee8d2c1355"
207+
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
208+
version = "1.3.0"
209+
210+
[[UUIDs]]
211+
deps = ["Random", "SHA"]
212+
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
213+
214+
[[Unicode]]
215+
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
216+
217+
[[XML2_jll]]
218+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"]
219+
git-tree-sha1 = "1acf5bdf07aa0907e0a37d3718bb88d4b687b74a"
220+
uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a"
221+
version = "2.9.12+0"
222+
223+
[[Zlib_jll]]
224+
deps = ["Libdl"]
225+
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
226+
227+
[[libsodium_jll]]
228+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
229+
git-tree-sha1 = "848ab3d00fe39d6fbc2a8641048f8f272af1c51e"
230+
uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8"
231+
version = "1.0.20+0"
232+
233+
[[nghttp2_jll]]
234+
deps = ["Artifacts", "Libdl"]
235+
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
236+
237+
[[p7zip_jll]]
238+
deps = ["Artifacts", "Libdl"]
239+
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"

benchmark/Project.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[deps]
2+
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
3+
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
4+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
5+
Git = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
6+
GitHub = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26"
7+
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
8+
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
9+
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
10+
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
11+
SolverBenchmark = "581a75fa-a23a-52d0-a590-d6201de2218a"

benchmark/benchmarks.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
using BenchmarkTools
2+
3+
const SUITE = BenchmarkGroup()
4+
5+
# Write your benchmarks here:

0 commit comments

Comments
 (0)