@@ -3,6 +3,39 @@ permissions:
33 contents : read
44on :
55 workflow_dispatch :
6+ inputs :
7+ run_1 :
8+ description : " Git tag and env vars for runs. Format: \" git_tag:ENV_VAR_1=one;ENV_VAR_2=two\"\n 1st run"
9+ required : true
10+ type : string
11+ run_2 :
12+ description : " 2nd run"
13+ required : false
14+ type : string
15+ run_3 :
16+ description : " 3rd run"
17+ required : false
18+ type : string
19+ run_4 :
20+ description : " 4th run"
21+ required : false
22+ type : string
23+ agent_test_agent_disabled :
24+ description : " Test run with agent disabled?"
25+ default : true
26+ required : true
27+ type : boolean
28+ run_time :
29+ description : " Run time"
30+ default : 5m
31+ required : true
32+ type : string
33+ iterations :
34+ description : " Number of iterations to run"
35+ default : 5
36+ required : true
37+ type : string
38+ # maybe add a name for each run so its better on graph
639
740
841
@@ -14,11 +47,118 @@ jobs:
1447 run : ' git config --global init.defaultBranch main'
1548 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
1649
17- - run : echo 'hi im not doin nothin'
50+ - name : run 1st version
51+ uses : ./.github/actions/run_perfverse
52+ with :
53+ agent_tag : ${{ inputs.run_1 }}
54+ run_time : ${{ inputs.run_time }}
55+ nr_license_key : ${{ secrets.NEW_RELIC_LICENSE_KEY }}
56+ iterations : ${{ inputs.iterations }}
57+ run_label : run_one
1858
59+ run_perf_tests_2 :
60+ runs-on : ubuntu-latest
61+ if : ${{ inputs.run_2 != '' }}
62+ steps :
63+ - name : Configure git
64+ run : ' git config --global init.defaultBranch main'
65+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
1966
67+ - name : run 2nd version
68+ uses : ./.github/actions/run_perfverse
69+ with :
70+ agent_tag : ${{ inputs.run_2 }}
71+ run_time : ${{ inputs.run_time }}
72+ nr_license_key : ${{ secrets.NEW_RELIC_LICENSE_KEY }}
73+ iterations : ${{ inputs.iterations }}
74+ run_label : run_two
75+
76+ run_perf_tests_3 :
77+ runs-on : ubuntu-latest
78+ if : ${{ inputs.run_3 != '' }}
79+ steps :
80+ - name : Configure git
81+ run : ' git config --global init.defaultBranch main'
82+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
83+
84+ - name : run 3rd version
85+ uses : ./.github/actions/run_perfverse
86+ with :
87+ agent_tag : ${{ inputs.run_3 }}
88+ run_time : ${{ inputs.run_time }}
89+ nr_license_key : ${{ secrets.NEW_RELIC_LICENSE_KEY }}
90+ iterations : ${{ inputs.iterations }}
91+ run_label : run_three
92+
93+ run_perf_tests_4 :
94+ runs-on : ubuntu-latest
95+ if : ${{ inputs.run_4 != '' }}
96+ steps :
97+ - name : Configure git
98+ run : ' git config --global init.defaultBranch main'
99+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
100+
101+ - name : run 4th version
102+ uses : ./.github/actions/run_perfverse
103+ with :
104+ agent_tag : ${{ inputs.run_4 }}
105+ run_time : ${{ inputs.run_time }}
106+ nr_license_key : ${{ secrets.NEW_RELIC_LICENSE_KEY }}
107+ iterations : ${{ inputs.iterations }}
108+ run_label : run_four
109+
110+
111+ run_perf_tests_disabled :
112+ runs-on : ubuntu-latest
113+ if : ${{ inputs.agent_test_agent_disabled }}
114+ steps :
115+ - name : Configure git
116+ run : ' git config --global init.defaultBranch main'
117+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
118+
119+ - name : run agent disabled version
120+ uses : ./.github/actions/run_perfverse
121+ with :
122+ agent_tag : " AGENT_DISABLED:NEW_RELIC_AGENT_ENABLED=false"
123+ run_time : ${{ inputs.run_time }}
124+ nr_license_key : ${{ secrets.NEW_RELIC_LICENSE_KEY }}
125+ iterations : ${{ inputs.iterations }}
126+ run_label : run_agent_disabled
127+
128+ create_graphs :
129+ needs : [run_perf_tests_disabled, run_perf_tests_4, run_perf_tests_3, run_perf_tests_2, run_perf_tests_1]
130+ if : always()
131+ runs-on : ubuntu-latest
132+ steps :
133+ - name : Configure git
134+ run : ' git config --global init.defaultBranch main'
135+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # tag v5.0.0
20136
137+ - name : create dirs
138+ run : |
139+ mkdir output
140+ mkdir inputs
141+ working-directory : ./test/perfverse/reports
21142
143+ - name : Download all workflow run artifacts
144+ uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # tag v5.0.0
145+ with :
146+ path : test/perfverse/reports/inputs
22147
148+ - name : Build docker image to make graphs
149+ run : |
150+ docker build --pull --progress=plain -t charty:local .
151+ working-directory : ./test/perfverse/reports
23152
153+ - name : Run docker image to make graphs
154+ run : |
155+ docker run --rm --name ruby-charty --mount type=bind,source=./output,target=/charty/output charty:local
156+ working-directory : ./test/perfverse/reports
24157
158+ - name : Upload graphs
159+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # tag v4.6.2
160+ with :
161+ if-no-files-found : error
162+ path : test/perfverse/reports/output/
163+ name : graphs
164+ retention-days : 14
0 commit comments