-
Notifications
You must be signed in to change notification settings - Fork 7
947 lines (939 loc) · 73.1 KB
/
Copy pathab-testing.yml
File metadata and controls
947 lines (939 loc) · 73.1 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
name: Apache bench (HTTP load speed) testing for EC-CUBE
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
load-test:
name: Apache bench (HTTP load speed) testing for EC-CUBE
runs-on: ubuntu-latest
steps:
# POSTGRES SQL
# BASE PRODUCTS
# PLUGIN
- name: PGSQL BASE PLUGIN
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/ec-cube
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml up -d --wait
- name: Force open permissions
run: |
sudo chmod 777 -R .
- name: Download Plugin
uses: actions/checkout@master
with:
path: app/Plugin/TwoFactorAuthCustomer44
- name: Download Plugin TwoFactorAuthCustomerApp44
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/TwoFactorAuthCustomerApp44
path: app/Plugin/TwoFactorAuthCustomerApp44
- name: Download Plugin TwoFactorAuthCustomerSms44
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/TwoFactorAuthCustomerSms44
path: app/Plugin/TwoFactorAuthCustomerSms44
- name: Sleep for MySQL
run: sleep 120s
shell: bash
- name: Install Plugin
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomer44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomer44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomerApp44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomerApp44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomerSms44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomerSms44
- name: Wait 30s for the database to load, (as I do not know the databases active state)
run: sleep 30s
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml up -d --wait
- name: Request home page - PGSQL PLUGIN BASE
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/ > pg-plugin-home_1.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-plugin-home_2.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-plugin-home_3.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-plugin-home_4.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-plugin-home_5.txt
export PG_4_1_HOME_1="$(tail -n +23 pg-plugin-home_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_4_1_HOME_2="$(tail -n +23 pg-plugin-home_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_4_1_HOME_3="$(tail -n +23 pg-plugin-home_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_4_1_HOME_4="$(tail -n +23 pg-plugin-home_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_4_1_HOME_5="$(tail -n +23 pg-plugin-home_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_4_1_HOME_RPS_1="$(tail -n +20 pg-plugin-home_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_4_1_HOME_RPS_2="$(tail -n +20 pg-plugin-home_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_4_1_HOME_RPS_3="$(tail -n +20 pg-plugin-home_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_4_1_HOME_RPS_4="$(tail -n +20 pg-plugin-home_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_4_1_HOME_RPS_5="$(tail -n +20 pg-plugin-home_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$PG_4_1_HOME_1 + $PG_4_1_HOME_2 + $PG_4_1_HOME_3 + $PG_4_1_HOME_4 + $PG_4_1_HOME_5" | bc -l)
RPS_SUM=$(echo "$PG_4_1_HOME_RPS_1 + $PG_4_1_HOME_RPS_2 + $PG_4_1_HOME_RPS_3 + $PG_4_1_HOME_RPS_4 + $PG_4_1_HOME_RPS_5" | bc -l)
COUNT=5
export PSQL_PLUGIN_BASE_HOME_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export PSQL_PLUGIN_BASE_HOME_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${PSQL_PLUGIN_BASE_HOME_RESULT}"
echo "REQUESTS PER SECOND AVG: ${PSQL_PLUGIN_BASE_HOME_RPS_RESULT}"
echo "PSQL_PLUGIN_BASE_HOME_RESULT=${PSQL_PLUGIN_BASE_HOME_RESULT}" >> $GITHUB_ENV
echo "PSQL_PLUGIN_BASE_HOME_RPS_RESULT=${PSQL_PLUGIN_BASE_HOME_RPS_RESULT}" >> $GITHUB_ENV
- name: Request list page - PGSQL PLUGIN BASE
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-plugin-base-list_1.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-plugin-base-list_2.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-plugin-base-list_3.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-plugin-base-list_4.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-plugin-base-list_5.txt
export PG_4_1_LIST_1="$(tail -n +23 pg-plugin-base-list_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_4_1_LIST_2="$(tail -n +23 pg-plugin-base-list_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_4_1_LIST_3="$(tail -n +23 pg-plugin-base-list_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_4_1_LIST_4="$(tail -n +23 pg-plugin-base-list_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_4_1_LIST_5="$(tail -n +23 pg-plugin-base-list_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_4_1_LIST_RPS_1="$(tail -n +20 pg-plugin-base-list_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_4_1_LIST_RPS_2="$(tail -n +20 pg-plugin-base-list_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_4_1_LIST_RPS_3="$(tail -n +20 pg-plugin-base-list_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_4_1_LIST_RPS_4="$(tail -n +20 pg-plugin-base-list_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_4_1_LIST_RPS_5="$(tail -n +20 pg-plugin-base-list_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$PG_4_1_LIST_1 + $PG_4_1_LIST_2 + $PG_4_1_LIST_3 + $PG_4_1_LIST_4 + $PG_4_1_LIST_5" | bc -l)
RPS_SUM=$(echo "$PG_4_1_LIST_RPS_1 + $PG_4_1_LIST_RPS_2 + $PG_4_1_LIST_RPS_3 + $PG_4_1_LIST_RPS_4 + $PG_4_1_LIST_RPS_5" | bc -l)
COUNT=5
export PSQL_PLUGIN_BASE_LIST_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export PSQL_PLUGIN_BASE_LIST_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${PSQL_PLUGIN_BASE_LIST_RESULT}"
echo "REQUESTS PER SECOND AVG: ${PSQL_PLUGIN_BASE_LIST_RPS_RESULT}"
echo "PSQL_PLUGIN_BASE_LIST_RESULT=${PSQL_PLUGIN_BASE_LIST_RESULT}" >> $GITHUB_ENV
echo "PSQL_PLUGIN_BASE_LIST_RPS_RESULT=${PSQL_PLUGIN_BASE_LIST_RPS_RESULT}" >> $GITHUB_ENV
# Upload Evidence
- name: Drop PGSQL ECCUBE for 4.2
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml down -v
- name: 'Cleanup build folder'
run: |
sudo ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
sudo ls -la ./
# PGSQL
# BASE PRODUCTS
# NO PLUGIN
- name: PGSQL BASE NO PLUGIN
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/ec-cube
- name: Setup to EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml up -d --wait
- name: Force open permissions
run: |
sudo chmod 777 -R .
- name: Wait 2 minutes for the database to load, (as I do not know the databases active state)
run: sleep 120s
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml up -d --wait
- name: Request home page - PGSQL NO PLUGIN BASE
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/ > pg-no-plugin-10000-home_1.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-no-plugin-10000-home_2.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-no-plugin-10000-home_3.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-no-plugin-10000-home_4.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-no-plugin-10000-home_5.txt
export PG_NO_PLUGIN_BASE_HOME_1="$(tail -n +23 pg-no-plugin-10000-home_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_BASE_HOME_2="$(tail -n +23 pg-no-plugin-10000-home_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_BASE_HOME_3="$(tail -n +23 pg-no-plugin-10000-home_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_BASE_HOME_4="$(tail -n +23 pg-no-plugin-10000-home_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_BASE_HOME_5="$(tail -n +23 pg-no-plugin-10000-home_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_BASE_HOME_RPS_1="$(tail -n +20 pg-no-plugin-10000-home_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_BASE_HOME_RPS_2="$(tail -n +20 pg-no-plugin-10000-home_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_BASE_HOME_RPS_3="$(tail -n +20 pg-no-plugin-10000-home_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_BASE_HOME_RPS_4="$(tail -n +20 pg-no-plugin-10000-home_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_BASE_HOME_RPS_5="$(tail -n +20 pg-no-plugin-10000-home_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$PG_NO_PLUGIN_BASE_HOME_1 + $PG_NO_PLUGIN_BASE_HOME_2 + $PG_NO_PLUGIN_BASE_HOME_3 + $PG_NO_PLUGIN_BASE_HOME_4 + $PG_NO_PLUGIN_BASE_HOME_5" | bc -l)
RPS_SUM=$(echo "$PG_NO_PLUGIN_BASE_HOME_RPS_1 + $PG_NO_PLUGIN_BASE_HOME_RPS_2 + $PG_NO_PLUGIN_BASE_HOME_RPS_3 + $PG_NO_PLUGIN_BASE_HOME_RPS_4 + $PG_NO_PLUGIN_BASE_HOME_RPS_5" | bc -l)
COUNT=5
export PSQL_NO_PLUGIN_BASE_HOME_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export PSQL_NO_PLUGIN_BASE_HOME_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${PSQL_NO_PLUGIN_BASE_HOME_RESULT}"
echo "REQUESTS PER SECOND AVG: ${PSQL_NO_PLUGIN_BASE_HOME_RPS_RESULT}"
echo "PSQL_NO_PLUGIN_BASE_HOME_RESULT=${PSQL_NO_PLUGIN_BASE_HOME_RESULT}" >> $GITHUB_ENV
echo "PSQL_NO_PLUGIN_BASE_HOME_RPS_RESULT=${PSQL_NO_PLUGIN_BASE_HOME_RPS_RESULT}" >> $GITHUB_ENV
- name: Request list page - PGSQL NO PLUGIN BASE
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-no-plugin-10000-list_1.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-no-plugin-10000-list_2.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-no-plugin-10000-list_3.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-no-plugin-10000-list_4.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-no-plugin-10000-list_5.txt
export PG_NO_PLUGIN_BASE_LIST_1="$(tail -n +23 pg-no-plugin-10000-list_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_BASE_LIST_2="$(tail -n +23 pg-no-plugin-10000-list_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_BASE_LIST_3="$(tail -n +23 pg-no-plugin-10000-list_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_BASE_LIST_4="$(tail -n +23 pg-no-plugin-10000-list_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_BASE_LIST_5="$(tail -n +23 pg-no-plugin-10000-list_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_BASE_LIST_RPS_1="$(tail -n +20 pg-no-plugin-10000-list_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_BASE_LIST_RPS_2="$(tail -n +20 pg-no-plugin-10000-list_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_BASE_LIST_RPS_3="$(tail -n +20 pg-no-plugin-10000-list_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_BASE_LIST_RPS_4="$(tail -n +20 pg-no-plugin-10000-list_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_BASE_LIST_RPS_5="$(tail -n +20 pg-no-plugin-10000-list_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$PG_NO_PLUGIN_BASE_LIST_1 + $PG_NO_PLUGIN_BASE_LIST_2 + $PG_NO_PLUGIN_BASE_LIST_3 + $PG_NO_PLUGIN_BASE_LIST_4 + $PG_NO_PLUGIN_BASE_LIST_5" | bc -l)
RPS_SUM=$(echo "$PG_NO_PLUGIN_BASE_LIST_RPS_1 + $PG_NO_PLUGIN_BASE_LIST_RPS_2 + $PG_NO_PLUGIN_BASE_LIST_RPS_3 + $PG_NO_PLUGIN_BASE_LIST_RPS_4 + $PG_NO_PLUGIN_BASE_LIST_RPS_5" | bc -l)
COUNT=5
export PSQL_NO_PLUGIN_BASE_LIST_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export PSQL_NO_PLUGIN_BASE_LIST_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${PSQL_NO_PLUGIN_BASE_LIST_RESULT}"
echo "REQUESTS PER SECOND AVG: ${PSQL_NO_PLUGIN_BASE_LIST_RPS_RESULT}"
echo "PSQL_NO_PLUGIN_BASE_LIST_RESULT=${PSQL_NO_PLUGIN_BASE_LIST_RESULT}" >> $GITHUB_ENV
echo "PSQL_NO_PLUGIN_BASE_LIST_RPS_RESULT=${PSQL_NO_PLUGIN_BASE_LIST_RPS_RESULT}" >> $GITHUB_ENV
- name: Drop PGSQL ECCUBE for 4.2.1-20230116
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.dev.yml -f docker-compose.pgsql.yml down -v
- name: 'Cleanup build folder'
run: |
sudo ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
sudo ls -la ./
# MYSQL
# BASE PRODUCTS
# PLUGIN
- name: MYSQL BASE PLUGIN
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/ec-cube
- name: Force open permissions
run: |
sudo chmod 777 -R .
- name: Download Plugin
uses: actions/checkout@master
with:
path: app/Plugin/TwoFactorAuthCustomer44
- name: Download Plugin TwoFactorAuthCustomerApp44
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/TwoFactorAuthCustomerApp44
path: app/Plugin/TwoFactorAuthCustomerApp44
- name: Download Plugin TwoFactorAuthCustomerSms44
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/TwoFactorAuthCustomerSms44
path: app/Plugin/TwoFactorAuthCustomerSms44
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml up -d
- name: Sleep for MySQL
run: sleep 120s
shell: bash
- name: Install Plugin
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomer44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomer44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomerApp44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomerApp44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomerSms44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomerSms44
- name: Wait for 30 seconds for the database to load, (because MySQL is slow to initialize)
run: sleep 30s
shell: bash
- name: Request home page
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-plugin-base-home_1.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-plugin-base-home_2.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-plugin-base-home_3.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-plugin-base-home_4.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-plugin-base-home_5.txt
export MY_PLUGIN_HOME_BASE_1="$(tail -n +23 mysql-plugin-base-home_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_HOME_BASE_2="$(tail -n +23 mysql-plugin-base-home_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_HOME_BASE_3="$(tail -n +23 mysql-plugin-base-home_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_HOME_BASE_4="$(tail -n +23 mysql-plugin-base-home_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_HOME_BASE_5="$(tail -n +23 mysql-plugin-base-home_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_HOME_BASE_RPS_1="$(tail -n +20 mysql-plugin-base-home_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_HOME_BASE_RPS_2="$(tail -n +20 mysql-plugin-base-home_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_HOME_BASE_RPS_3="$(tail -n +20 mysql-plugin-base-home_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_HOME_BASE_RPS_4="$(tail -n +20 mysql-plugin-base-home_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_HOME_BASE_RPS_5="$(tail -n +20 mysql-plugin-base-home_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$MY_PLUGIN_HOME_BASE_1 + $MY_PLUGIN_HOME_BASE_2 + $MY_PLUGIN_HOME_BASE_3 + $MY_PLUGIN_HOME_BASE_4 + $MY_PLUGIN_HOME_BASE_5" | bc -l)
RPS_SUM=$(echo "$MY_PLUGIN_HOME_BASE_RPS_1 + $MY_PLUGIN_HOME_BASE_RPS_2 + $MY_PLUGIN_HOME_BASE_RPS_3 + $MY_PLUGIN_HOME_BASE_RPS_4 + $MY_PLUGIN_HOME_BASE_RPS_5" | bc -l)
COUNT=5
export MSQL_PLUGIN_BASE_HOME_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export MSQL_PLUGIN_BASE_HOME_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${MSQL_PLUGIN_BASE_HOME_RESULT}"
echo "REQUESTS PER SECOND AVG: ${MSQL_PLUGIN_BASE_HOME_RPS_RESULT}"
echo "MSQL_PLUGIN_BASE_HOME_RESULT=${MSQL_PLUGIN_BASE_HOME_RESULT}" >> $GITHUB_ENV
echo "MSQL_PLUGIN_BASE_HOME_RPS_RESULT=${MSQL_PLUGIN_BASE_HOME_RPS_RESULT}" >> $GITHUB_ENV
- name: Request list page
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-plugin-base-list_1.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-plugin-base-list_2.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-plugin-base-list_3.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-plugin-base-list_4.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-plugin-base-list_5.txt
export MY_PLUGIN_BASE_LIST_1="$(tail -n +23 mysql-plugin-base-list_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_BASE_LIST_2="$(tail -n +23 mysql-plugin-base-list_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_BASE_LIST_3="$(tail -n +23 mysql-plugin-base-list_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_BASE_LIST_4="$(tail -n +23 mysql-plugin-base-list_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_BASE_LIST_5="$(tail -n +23 mysql-plugin-base-list_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_BASE_LIST_RPS_1="$(tail -n +20 mysql-plugin-base-list_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_BASE_LIST_RPS_2="$(tail -n +20 mysql-plugin-base-list_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_BASE_LIST_RPS_3="$(tail -n +20 mysql-plugin-base-list_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_BASE_LIST_RPS_4="$(tail -n +20 mysql-plugin-base-list_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_BASE_LIST_RPS_5="$(tail -n +20 mysql-plugin-base-list_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$MY_PLUGIN_BASE_LIST_1 + $MY_PLUGIN_BASE_LIST_2 + $MY_PLUGIN_BASE_LIST_3 + $MY_PLUGIN_BASE_LIST_4 + $MY_PLUGIN_BASE_LIST_5" | bc -l)
RPS_SUM=$(echo "$MY_PLUGIN_BASE_LIST_RPS_1 + $MY_PLUGIN_BASE_LIST_RPS_2 + $MY_PLUGIN_BASE_LIST_RPS_3 + $MY_PLUGIN_BASE_LIST_RPS_4 + $MY_PLUGIN_BASE_LIST_RPS_5" | bc -l)
COUNT=5
export MSQL_PLUGIN_BASE_LIST_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export MSQL_PLUGIN_BASE_LIST_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${MSQL_PLUGIN_BASE_LIST_RESULT}"
echo "REQUESTS PER SECOND AVG: ${MSQL_PLUGIN_BASE_LIST_RPS_RESULT}"
echo "MSQL_PLUGIN_BASE_LIST_RESULT=${MSQL_PLUGIN_BASE_LIST_RESULT}" >> $GITHUB_ENV
echo "MSQL_PLUGIN_BASE_LIST_RPS_RESULT=${MSQL_PLUGIN_BASE_LIST_RPS_RESULT}" >> $GITHUB_ENV
- name: Drop MYSQL ECCUBE for 4.2
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml down -v
- name: 'Cleanup build folder'
run: |
sudo ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
sudo ls -la ./
# MYSQL
# BASE PRODUCTS
# NO PLUGIN
- name: MYSQL BASE NO PLUGIN
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/ec-cube
- name: Force open permissions
run: |
sudo chmod 777 -R .
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml up -d
- name: Wait for 30 seconds for the database to load, (because MySQL is slow to initialize)
run: sleep 30s
shell: bash
- name: Request home page
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-no-plugin-base-home_1.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-no-plugin-base-home_2.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-no-plugin-base-home_3.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-no-plugin-base-home_4.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-no-plugin-base-home_5.txt
export MY_NO_PLUGIN_HOME_1="$(tail -n +23 mysql-no-plugin-base-home_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_HOME_2="$(tail -n +23 mysql-no-plugin-base-home_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_HOME_3="$(tail -n +23 mysql-no-plugin-base-home_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_HOME_4="$(tail -n +23 mysql-no-plugin-base-home_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_HOME_5="$(tail -n +23 mysql-no-plugin-base-home_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_HOME_RPS_1="$(tail -n +20 mysql-no-plugin-base-home_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_HOME_RPS_2="$(tail -n +20 mysql-no-plugin-base-home_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_HOME_RPS_3="$(tail -n +20 mysql-no-plugin-base-home_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_HOME_RPS_4="$(tail -n +20 mysql-no-plugin-base-home_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_HOME_RPS_5="$(tail -n +20 mysql-no-plugin-base-home_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$MY_NO_PLUGIN_HOME_1 + $MY_NO_PLUGIN_HOME_2 + $MY_NO_PLUGIN_HOME_3 + $MY_NO_PLUGIN_HOME_4 + $MY_NO_PLUGIN_HOME_5" | bc -l)
RPS_SUM=$(echo "$MY_NO_PLUGIN_HOME_RPS_1 + $MY_NO_PLUGIN_HOME_RPS_2 + $MY_NO_PLUGIN_HOME_RPS_3 + $MY_NO_PLUGIN_HOME_RPS_4 + $MY_NO_PLUGIN_HOME_RPS_5" | bc -l)
COUNT=5
export MSQL_NO_PLUGIN_BASE_HOME_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export MSQL_NO_PLUGIN_BASE_HOME_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${MSQL_NO_PLUGIN_BASE_HOME_RESULT}"
echo "REQUESTS PER SECOND AVG: ${MSQL_NO_PLUGIN_BASE_HOME_RPS_RESULT}"
echo "MSQL_NO_PLUGIN_BASE_HOME_RESULT=${MSQL_NO_PLUGIN_BASE_HOME_RESULT}" >> $GITHUB_ENV
echo "MSQL_NO_PLUGIN_BASE_HOME_RPS_RESULT=${MSQL_NO_PLUGIN_BASE_HOME_RPS_RESULT}" >> $GITHUB_ENV
- name: Request list page
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-no-plugin-base-list_1.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-no-plugin-base-list_2.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-no-plugin-base-list_3.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-no-plugin-base-list_4.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-no-plugin-base-list_5.txt
export MY_NO_PLUGIN_LIST_1="$(tail -n +23 mysql-no-plugin-base-list_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_LIST_2="$(tail -n +23 mysql-no-plugin-base-list_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_LIST_3="$(tail -n +23 mysql-no-plugin-base-list_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_LIST_4="$(tail -n +23 mysql-no-plugin-base-list_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_LIST_5="$(tail -n +23 mysql-no-plugin-base-list_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_LIST_RPS_1="$(tail -n +20 mysql-no-plugin-base-list_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_LIST_RPS_2="$(tail -n +20 mysql-no-plugin-base-list_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_LIST_RPS_3="$(tail -n +20 mysql-no-plugin-base-list_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_LIST_RPS_4="$(tail -n +20 mysql-no-plugin-base-list_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_LIST_RPS_5="$(tail -n +20 mysql-no-plugin-base-list_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$MY_NO_PLUGIN_LIST_1 + $MY_NO_PLUGIN_LIST_2 + $MY_NO_PLUGIN_LIST_3 + $MY_NO_PLUGIN_LIST_4 + $MY_NO_PLUGIN_LIST_5" | bc -l)
RPS_SUM=$(echo "$MY_NO_PLUGIN_LIST_RPS_1 + $MY_NO_PLUGIN_LIST_RPS_2 + $MY_NO_PLUGIN_LIST_RPS_3 + $MY_NO_PLUGIN_LIST_RPS_4 + $MY_NO_PLUGIN_LIST_RPS_5" | bc -l)
COUNT=5
export MSQL_NO_PLUGIN_BASE_LIST_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export MSQL_NO_PLUGIN_BASE_LIST_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${MSQL_NO_PLUGIN_BASE_LIST_RESULT}"
echo "REQUESTS PER SECOND AVG: ${MSQL_NO_PLUGIN_BASE_LIST_RPS_RESULT}"
echo "MSQL_NO_PLUGIN_BASE_LIST_RESULT=${MSQL_NO_PLUGIN_BASE_LIST_RESULT}" >> $GITHUB_ENV
echo "MSQL_NO_PLUGIN_BASE_LIST_RPS_RESULT=${MSQL_NO_PLUGIN_BASE_LIST_RPS_RESULT}" >> $GITHUB_ENV
- name: Drop MYSQL ECCUBE
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.mysql.yml down -v
- name: 'Cleanup build folder'
run: |
sudo ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
sudo ls -la ./
# POSTGRES SQL
# 10,000 PRODUCTS
# PLUGIN
- name: PSQL 10000 PLUGIN
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/ec-cube
- name: Force open permissions
run: |
sudo chmod 777 -R .
- name: Download 4.2 Apache Bench Data
run: |
mkdir .github/workflows/pgsql
sudo chmod 777 .github/workflows/pgsql
curl --fail -LJO https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/apache_workbench_speed_tool/docker-compose.bench.pgsql.yml
if [ ! -f docker-compose.bench.pgsql.yml ]; then
echo "docker-compose.bench.pgsql.yml File not found!"
else
echo "docker-compose.bench.pgsql.yml File found!"
fi
curl --fail -LJ https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/apache_workbench_speed_tool/.github/workflows/pgsql/eccubedb_localhost-2022_06_30_17_25_15-dump.sql -o .github/workflows/pgsql/eccubedb_localhost-2022_06_30_17_25_15-dump.sql
if [ ! -f .github/workflows/pgsql/eccubedb_localhost-2022_06_30_17_25_15-dump.sql ]; then
echo ".github/workflows/pgsql/eccubedb_localhost-2022_06_30_17_25_15-dump.sql File not found!"
else
echo ".github/workflows/pgsql/eccubedb_localhost-2022_06_30_17_25_15-dump.sql File found!"
fi
curl --fail -LJ https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/apache_workbench_speed_tool/.github/workflows/pgsql/Dockerfile -o .github/workflows/pgsql/Dockerfile
if [ ! -f .github/workflows/pgsql/Dockerfile ]; then
echo ".github/workflows/pgsql/Dockerfile File not found!"
else
echo ".github/workflows/pgsql/Dockerfile File found!"
fi
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml up -d
- name: Download Plugin
uses: actions/checkout@master
with:
path: app/Plugin/TwoFactorAuthCustomer44
- name: Download Plugin TwoFactorAuthCustomerApp44
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/TwoFactorAuthCustomerApp44
path: app/Plugin/TwoFactorAuthCustomerApp44
- name: Download Plugin TwoFactorAuthCustomerSms44
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/TwoFactorAuthCustomerSms44
path: app/Plugin/TwoFactorAuthCustomerSms44
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml up -d
- name: Wait 2 minutes for the database to load, (as I do not know the databases active state)
run: sleep 120s
shell: bash
- name: Install Plugin
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomer44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomer44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomerApp44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomerApp44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomerSms44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomerSms44
- name: Request home page - PGSQL PLUGIN 10000 PRODUCTS
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/ > pg-plugin-10000-home_1.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-plugin-10000-home_2.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-plugin-10000-home_3.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-plugin-10000-home_4.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-plugin-10000-home_5.txt
export PG_PLUGIN_10000_HOME_1="$(tail -n +23 pg-plugin-10000-home_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_PLUGIN_10000_HOME_2="$(tail -n +23 pg-plugin-10000-home_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_PLUGIN_10000_HOME_3="$(tail -n +23 pg-plugin-10000-home_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_PLUGIN_10000_HOME_4="$(tail -n +23 pg-plugin-10000-home_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_PLUGIN_10000_HOME_5="$(tail -n +23 pg-plugin-10000-home_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_PLUGIN_10000_HOME_RPS_1="$(tail -n +20 pg-plugin-10000-home_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_PLUGIN_10000_HOME_RPS_2="$(tail -n +20 pg-plugin-10000-home_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_PLUGIN_10000_HOME_RPS_3="$(tail -n +20 pg-plugin-10000-home_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_PLUGIN_10000_HOME_RPS_4="$(tail -n +20 pg-plugin-10000-home_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_PLUGIN_10000_HOME_RPS_5="$(tail -n +20 pg-plugin-10000-home_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$PG_PLUGIN_10000_HOME_1 + $PG_PLUGIN_10000_HOME_2 + $PG_PLUGIN_10000_HOME_3 + $PG_PLUGIN_10000_HOME_4 + $PG_PLUGIN_10000_HOME_5" | bc -l)
RPS_SUM=$(echo "$PG_PLUGIN_10000_HOME_RPS_1 + $PG_PLUGIN_10000_HOME_RPS_2 + $PG_PLUGIN_10000_HOME_RPS_3 + $PG_PLUGIN_10000_HOME_RPS_4 + $PG_PLUGIN_10000_HOME_RPS_5" | bc -l)
COUNT=5
export PG_PLUGIN_10000_HOME_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export PG_PLUGIN_10000_HOME_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${PG_PLUGIN_10000_HOME_RESULT}"
echo "REQUESTS PER SECOND AVG: ${PG_PLUGIN_10000_HOME_RPS_RESULT}"
echo "PG_PLUGIN_10000_HOME_RESULT=${PG_PLUGIN_10000_HOME_RESULT}" >> $GITHUB_ENV
echo "PG_PLUGIN_10000_HOME_RPS_RESULT=${PG_PLUGIN_10000_HOME_RPS_RESULT}" >> $GITHUB_ENV
- name: Request list page - PGSQL PLUGIN 10000 PRODUCTS
run: |
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-plugin-10000-list_1.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-plugin-10000-list_2.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-plugin-10000-list_3.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-plugin-10000-list_4.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-plugin-10000-list_5.txt
export PG_PLUGIN_10000_LIST1="$(tail -n +23 pg-plugin-10000-list_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_PLUGIN_10000_LIST2="$(tail -n +23 pg-plugin-10000-list_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_PLUGIN_10000_LIST3="$(tail -n +23 pg-plugin-10000-list_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_PLUGIN_10000_LIST4="$(tail -n +23 pg-plugin-10000-list_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_PLUGIN_10000_LIST5="$(tail -n +23 pg-plugin-10000-list_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_PLUGIN_10000_LISTRPS_1="$(tail -n +20 pg-plugin-10000-list_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_PLUGIN_10000_LISTRPS_2="$(tail -n +20 pg-plugin-10000-list_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_PLUGIN_10000_LISTRPS_3="$(tail -n +20 pg-plugin-10000-list_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_PLUGIN_10000_LISTRPS_4="$(tail -n +20 pg-plugin-10000-list_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_PLUGIN_10000_LISTRPS_5="$(tail -n +20 pg-plugin-10000-list_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$PG_PLUGIN_10000_LIST1 + $PG_PLUGIN_10000_LIST2 + $PG_PLUGIN_10000_LIST3 + $PG_PLUGIN_10000_LIST4 + $PG_PLUGIN_10000_LIST5" | bc -l)
RPS_SUM=$(echo "$PG_PLUGIN_10000_LISTRPS_1 + $PG_PLUGIN_10000_LISTRPS_2 + $PG_PLUGIN_10000_LISTRPS_3 + $PG_PLUGIN_10000_LISTRPS_4 + $PG_PLUGIN_10000_LISTRPS_5" | bc -l)
COUNT=5
export PG_PLUGIN_10000_LIST_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export PG_PLUGIN_10000_LIST_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${PG_PLUGIN_10000_LIST_RESULT}"
echo "REQUESTS PER SECOND AVG: ${PG_PLUGIN_10000_LIST_RPS_RESULT}"
echo "PG_PLUGIN_10000_LIST_RESULT=${PG_PLUGIN_10000_LIST_RESULT}" >> $GITHUB_ENV
echo "PG_PLUGIN_10000_LIST_RPS_RESULT=${PG_PLUGIN_10000_LIST_RPS_RESULT}" >> $GITHUB_ENV
# Upload Evidence
- name: Print Average Results to CSV
run: |
echo "POSTGRES PLUGIN 100000 _ ${PG_PLUGIN_10000_HOME_RESULT}, ${PG_PLUGIN_10000_HOME_RPS_RESULT}, ${PG_PLUGIN_10000_LIST_RESULT}, ${PG_PLUGIN_10000_LIST_RPS_RESULT}"
- name: Drop PGSQL ECCUBE
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml down -v
- name: 'Cleanup build folder'
run: |
sudo ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
sudo ls -la ./
# POSTGRES SQL
# 10,000 PRODUCTS
# NO PLUGIN
- name: PSQL 10000 NO PLUGIN
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/ec-cube
- name: Force open permissions
run: |
sudo chmod 777 -R .
- name: Download 4.2 Apache Bench Data
run: |
mkdir .github/workflows/pgsql
sudo chmod 777 .github/workflows/pgsql
curl --fail -LJO https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/apache_workbench_speed_tool/docker-compose.bench.pgsql.yml
if [ ! -f docker-compose.bench.pgsql.yml ]; then
echo "docker-compose.bench.pgsql.yml File not found!"
else
echo "docker-compose.bench.pgsql.yml File found!"
fi
curl --fail -LJ https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/apache_workbench_speed_tool/.github/workflows/pgsql/eccubedb_localhost-2022_06_30_17_25_15-dump.sql -o .github/workflows/pgsql/eccubedb_localhost-2022_06_30_17_25_15-dump.sql
if [ ! -f .github/workflows/pgsql/eccubedb_localhost-2022_06_30_17_25_15-dump.sql ]; then
echo ".github/workflows/pgsql/eccubedb_localhost-2022_06_30_17_25_15-dump.sql File not found!"
else
echo ".github/workflows/pgsql/eccubedb_localhost-2022_06_30_17_25_15-dump.sql File found!"
fi
curl --fail -LJ https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/apache_workbench_speed_tool/.github/workflows/pgsql/Dockerfile -o .github/workflows/pgsql/Dockerfile
if [ ! -f .github/workflows/pgsql/Dockerfile ]; then
echo ".github/workflows/pgsql/Dockerfile File not found!"
else
echo ".github/workflows/pgsql/Dockerfile File found!"
fi
- name: Start Load EC-CUBE on 4.2.1-20230116
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml up -d
- name: Wait 2 minutes for the database to load, (as I do not know the databases active state)
run: sleep 60s
shell: bash
- name: Request home page - PGSQL PLUGIN 10000 PRODUCTS
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/ > pg-no-plugin-10000-home_1.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-no-plugin-10000-home_2.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-no-plugin-10000-home_3.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-no-plugin-10000-home_4.txt
ab -n 100 -c 10 -l http://localhost:8080/ > pg-no-plugin-10000-home_5.txt
export PG_NO_PLUGIN_10000_HOME_1="$(tail -n +23 pg-no-plugin-10000-home_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_10000_HOME_2="$(tail -n +23 pg-no-plugin-10000-home_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_10000_HOME_3="$(tail -n +23 pg-no-plugin-10000-home_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_10000_HOME_4="$(tail -n +23 pg-no-plugin-10000-home_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_10000_HOME_5="$(tail -n +23 pg-no-plugin-10000-home_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_10000_HOME_RPS_1="$(tail -n +20 pg-no-plugin-10000-home_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_10000_HOME_RPS_2="$(tail -n +20 pg-no-plugin-10000-home_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_10000_HOME_RPS_3="$(tail -n +20 pg-no-plugin-10000-home_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_10000_HOME_RPS_4="$(tail -n +20 pg-no-plugin-10000-home_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_10000_HOME_RPS_5="$(tail -n +20 pg-no-plugin-10000-home_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$PG_NO_PLUGIN_10000_HOME_1 + $PG_NO_PLUGIN_10000_HOME_2 + $PG_NO_PLUGIN_10000_HOME_3 + $PG_NO_PLUGIN_10000_HOME_4 + $PG_NO_PLUGIN_10000_HOME_5" | bc -l)
RPS_SUM=$(echo "$PG_NO_PLUGIN_10000_HOME_RPS_1 + $PG_NO_PLUGIN_10000_HOME_RPS_2 + $PG_NO_PLUGIN_10000_HOME_RPS_3 + $PG_NO_PLUGIN_10000_HOME_RPS_4 + $PG_NO_PLUGIN_10000_HOME_RPS_5" | bc -l)
COUNT=5
export PG_NO_PLUGIN_10000_HOME_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export PG_NO_PLUGIN_10000_HOME_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${PG_NO_PLUGIN_10000_HOME_RESULT}"
echo "REQUESTS PER SECOND AVG: ${PG_NO_PLUGIN_10000_HOME_RPS_RESULT}"
echo "PG_NO_PLUGIN_10000_HOME_RESULT=${PG_NO_PLUGIN_10000_HOME_RESULT}" >> $GITHUB_ENV
echo "PG_NO_PLUGIN_10000_HOME_RPS_RESULT=${PG_NO_PLUGIN_10000_HOME_RPS_RESULT}" >> $GITHUB_ENV
- name: Request list page - PGSQL PLUGIN 10000 PRODUCTS
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-no-plugin-10000-list_1.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-no-plugin-10000-list_2.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-no-plugin-10000-list_3.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-no-plugin-10000-list_4.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > pg-no-plugin-10000-list_5.txt
export PG_NO_PLUGIN_10000_LIST_1="$(tail -n +23 pg-no-plugin-10000-list_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_10000_LIST_2="$(tail -n +23 pg-no-plugin-10000-list_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_10000_LIST_3="$(tail -n +23 pg-no-plugin-10000-list_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_10000_LIST_4="$(tail -n +23 pg-no-plugin-10000-list_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_10000_LIST_5="$(tail -n +23 pg-no-plugin-10000-list_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export PG_NO_PLUGIN_10000_LIST_RPS_1="$(tail -n +20 pg-no-plugin-10000-list_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_10000_LIST_RPS_2="$(tail -n +20 pg-no-plugin-10000-list_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_10000_LIST_RPS_3="$(tail -n +20 pg-no-plugin-10000-list_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_10000_LIST_RPS_4="$(tail -n +20 pg-no-plugin-10000-list_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export PG_NO_PLUGIN_10000_LIST_RPS_5="$(tail -n +20 pg-no-plugin-10000-list_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$PG_NO_PLUGIN_10000_LIST_1 + $PG_NO_PLUGIN_10000_LIST_2 + $PG_NO_PLUGIN_10000_LIST_3 + $PG_NO_PLUGIN_10000_LIST_4 + $PG_NO_PLUGIN_10000_LIST_5" | bc -l)
RPS_SUM=$(echo "$PG_NO_PLUGIN_10000_LIST_RPS_1 + $PG_NO_PLUGIN_10000_LIST_RPS_2 + $PG_NO_PLUGIN_10000_LIST_RPS_3 + $PG_NO_PLUGIN_10000_LIST_RPS_4 + $PG_NO_PLUGIN_10000_LIST_RPS_5" | bc -l)
COUNT=5
export PG_NO_PLUGIN_10000_LIST_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export PG_NO_PLUGIN_10000_LIST_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${PG_NO_PLUGIN_10000_LIST_RESULT}"
echo "REQUESTS PER SECOND AVG: ${PG_NO_PLUGIN_10000_LIST_RPS_RESULT}"
echo "PG_NO_PLUGIN_10000_LIST_RESULT=${PG_NO_PLUGIN_10000_LIST_RESULT}" >> $GITHUB_ENV
echo "PG_NO_PLUGIN_10000_LIST_RPS_RESULT=${PG_NO_PLUGIN_10000_LIST_RPS_RESULT}" >> $GITHUB_ENV
# Upload Evidence
- name: Print 4.2.1-20230116 Average Results to Screen
run: |
echo "4.2 POSTGRES 100000 _ ${PG_NO_PLUGIN_10000_HOME_RESULT}, ${PG_NO_PLUGIN_10000_HOME_RPS_RESULT}, ${PG_NO_PLUGIN_10000_LIST_RESULT}, ${PG_NO_PLUGIN_10000_LIST_RPS_RESULT}"
- name: Drop PGSQL ECCUBE for 4.2.1-20230116
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.pgsql.yml down -v
- name: 'Cleanup build folder'
run: |
sudo ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
sudo ls -la ./
# MYSQL SQL
# 10,000 PRODUCTS
# PLUGIN
- name: MYSQL 10000 PLUGIN
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/ec-cube
- name: Force open permissions
run: |
sudo chmod 777 -R .
- name: Download 4.2 Apache Bench Data
run: |
mkdir .github/workflows/mysql
sudo chmod 777 .github/workflows/mysql
curl --fail -LJO https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/ab_testing/docker-compose.bench.mysql.yml
if [ ! -f docker-compose.bench.mysql.yml ]; then
echo "docker-compose.bench.mysql.yml File not found!"
else
echo "docker-compose.bench.mysql.yml File found!"
fi
curl --fail -LJ https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/ab_testing/.github/workflows/mysql/mysql_localhost-2022_07_06_19_15_00-dump.sql -o .github/workflows/mysql/mysql_localhost-2022_07_06_19_15_00-dump.sql
if [ ! -f .github/workflows/mysql/mysql_localhost-2022_07_06_19_15_00-dump.sql ]; then
echo ".github/workflows/mysql/mysql_localhost-2022_07_06_19_15_00-dump.sql File not found!"
else
echo ".github/workflows/mysql/mysql_localhost-2022_07_06_19_15_00-dump.sql File found!"
fi
curl --fail -LJ https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/ab_testing/.github/workflows/mysql/Dockerfile -o .github/workflows/mysql/Dockerfile
if [ ! -f .github/workflows/mysql/Dockerfile ]; then
echo ".github/workflows/mysql/Dockerfile File not found!"
else
echo ".github/workflows/mysql/Dockerfile File found!"
fi
- name: Download Plugin
uses: actions/checkout@master
with:
path: app/Plugin/TwoFactorAuthCustomer44
- name: Download Plugin TwoFactorAuthCustomerApp44
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/TwoFactorAuthCustomerApp44
path: app/Plugin/TwoFactorAuthCustomerApp44
- name: Download Plugin TwoFactorAuthCustomerSms44
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/TwoFactorAuthCustomerSms44
path: app/Plugin/TwoFactorAuthCustomerSms44
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml up -d
- name: Sleep for MySQL
run: sleep 120s
shell: bash
- name: Enquire ECCUBE
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml ps
- name: Get MYSQL Logs
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml logs mysql
- name: Get ECCUBE Logs
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml logs ec-cube
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml up -d
- name: Enquire ECCUBE
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml ps
- name: Get MYSQL Logs
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml logs mysql
- name: Get ECCUBE Logs
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml logs ec-cube
- name: Sleep for MySQL
run: sleep 60s
shell: bash
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml up -d
- name: Enquire ECCUBE
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml ps
- name: Get MYSQL Logs
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml logs mysql
- name: Get ECCUBE Logs
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml logs ec-cube
- name: Install Plugin
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomer44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomer44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomerApp44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomerApp44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console eccube:plugin:install --code=TwoFactorAuthCustomerSms44
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console cache:clear
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml exec -T ec-cube bin/console eccube:plugin:enable --code=TwoFactorAuthCustomerSms44
- name: Restart Load EC-CUBE to wait for MySQL
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml up -d
- name: Sleep for MySQL
run: sleep 30s
shell: bash
- name: Request home page - MYSQL PLUGIN 10000 PRODUCTS
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-plugin-10000-home_1.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-plugin-10000-home_2.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-plugin-10000-home_3.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-plugin-10000-home_4.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-plugin-10000-home_5.txt
export MY_PLUGIN_HOME_10000_1="$(tail -n +23 mysql-plugin-10000-home_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_HOME_10000_2="$(tail -n +23 mysql-plugin-10000-home_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_HOME_10000_3="$(tail -n +23 mysql-plugin-10000-home_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_HOME_10000_4="$(tail -n +23 mysql-plugin-10000-home_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_HOME_10000_5="$(tail -n +23 mysql-plugin-10000-home_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_HOME_10000_RPS_1="$(tail -n +20 mysql-plugin-10000-home_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_HOME_10000_RPS_2="$(tail -n +20 mysql-plugin-10000-home_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_HOME_10000_RPS_3="$(tail -n +20 mysql-plugin-10000-home_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_HOME_10000_RPS_4="$(tail -n +20 mysql-plugin-10000-home_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_HOME_10000_RPS_5="$(tail -n +20 mysql-plugin-10000-home_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$MY_PLUGIN_HOME_10000_1 + $MY_PLUGIN_HOME_10000_2 + $MY_PLUGIN_HOME_10000_3 + $MY_PLUGIN_HOME_10000_4 + $MY_PLUGIN_HOME_10000_5" | bc -l)
RPS_SUM=$(echo "$MY_PLUGIN_HOME_10000_RPS_1 + $MY_PLUGIN_HOME_10000_RPS_2 + $MY_PLUGIN_HOME_10000_RPS_3 + $MY_PLUGIN_HOME_10000_RPS_4 + $MY_PLUGIN_HOME_10000_RPS_5" | bc -l)
COUNT=5
export MSQL_PLUGIN_10000_HOME_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export MSQL_PLUGIN_10000_HOME_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${MSQL_PLUGIN_10000_HOME_RESULT}"
echo "REQUESTS PER SECOND AVG: ${MSQL_PLUGIN_10000_HOME_RPS_RESULT}"
echo "MSQL_PLUGIN_10000_HOME_RESULT=${MSQL_PLUGIN_10000_HOME_RESULT}" >> $GITHUB_ENV
echo "MSQL_PLUGIN_10000_HOME_RPS_RESULT=${MSQL_PLUGIN_10000_HOME_RPS_RESULT}" >> $GITHUB_ENV
- name: Request list page - MYSQL PLUGIN 10000 PRODUCTS
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-plugin-10000-list_1.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-plugin-10000-list_2.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-plugin-10000-list_3.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-plugin-10000-list_4.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-plugin-10000-list_5.txt
export MY_PLUGIN_10000_LIST_1="$(tail -n +23 mysql-plugin-10000-list_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_10000_LIST_2="$(tail -n +23 mysql-plugin-10000-list_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_10000_LIST_3="$(tail -n +23 mysql-plugin-10000-list_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_10000_LIST_4="$(tail -n +23 mysql-plugin-10000-list_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_10000_LIST_5="$(tail -n +23 mysql-plugin-10000-list_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_PLUGIN_10000_LIST_RPS_1="$(tail -n +20 mysql-plugin-10000-list_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_10000_LIST_RPS_2="$(tail -n +20 mysql-plugin-10000-list_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_10000_LIST_RPS_3="$(tail -n +20 mysql-plugin-10000-list_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_10000_LIST_RPS_4="$(tail -n +20 mysql-plugin-10000-list_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_PLUGIN_10000_LIST_RPS_5="$(tail -n +20 mysql-plugin-10000-list_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$MY_PLUGIN_10000_LIST_1 + $MY_PLUGIN_10000_LIST_2 + $MY_PLUGIN_10000_LIST_3 + $MY_PLUGIN_10000_LIST_4 + $MY_PLUGIN_10000_LIST_5" | bc -l)
RPS_SUM=$(echo "$MY_PLUGIN_10000_LIST_RPS_1 + $MY_PLUGIN_10000_LIST_RPS_2 + $MY_PLUGIN_10000_LIST_RPS_3 + $MY_PLUGIN_10000_LIST_RPS_4 + $MY_PLUGIN_10000_LIST_RPS_5" | bc -l)
COUNT=5
export MSQL_PLUGIN_10000_LIST_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export MSQL_PLUGIN_10000_LIST_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${MSQL_PLUGIN_10000_LIST_RESULT}"
echo "REQUESTS PER SECOND AVG: ${MSQL_PLUGIN_10000_LIST_RPS_RESULT}"
echo "MSQL_PLUGIN_10000_LIST_RESULT=${MSQL_PLUGIN_10000_LIST_RESULT}" >> $GITHUB_ENV
echo "MSQL_PLUGIN_10000_LIST_RPS_RESULT=${MSQL_PLUGIN_10000_LIST_RPS_RESULT}" >> $GITHUB_ENV
- name: Drop MYSQL ECCUBE for 4.2
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml down -v
- name: 'Cleanup build folder'
run: |
sudo ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
sudo ls -la ./
# MYSQL SQL
# 10,000 PRODUCTS
# NO PLUGIN
- name: MYSQL 10000 NO PLUGIN
uses: actions/checkout@master
with:
repository: ${{ github.repository_owner }}/ec-cube
- name: Force open permissions
run: |
sudo chmod 777 -R .
- name: Download 4.2 Apache Bench Data
run: |
mkdir .github/workflows/mysql
sudo chmod 777 .github/workflows/mysql
curl --fail -LJO https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/ab_testing/docker-compose.bench.mysql.yml
if [ ! -f docker-compose.bench.mysql.yml ]; then
echo "docker-compose.bench.mysql.yml File not found!"
else
echo "docker-compose.bench.mysql.yml File found!"
fi
curl --fail -LJ https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/ab_testing/.github/workflows/mysql/mysql_localhost-2022_07_06_19_15_00-dump.sql -o .github/workflows/mysql/mysql_localhost-2022_07_06_19_15_00-dump.sql
if [ ! -f .github/workflows/mysql/mysql_localhost-2022_07_06_19_15_00-dump.sql ]; then
echo ".github/workflows/mysql/mysql_localhost-2022_07_06_19_15_00-dump.sql File not found!"
else
echo ".github/workflows/mysql/mysql_localhost-2022_07_06_19_15_00-dump.sql File found!"
fi
curl --fail -LJ https://raw.githubusercontent.com/${{ github.repository_owner }}/ec-cube/feature/ab_testing/.github/workflows/mysql/Dockerfile -o .github/workflows/mysql/Dockerfile
if [ ! -f .github/workflows/mysql/Dockerfile ]; then
echo ".github/workflows/mysql/Dockerfile File not found!"
else
echo ".github/workflows/mysql/Dockerfile File found!"
fi
- name: Start Load EC-CUBE
run: |
sed -i 's!APP_ENV: "dev"!APP_ENV: "prod"!g' docker-compose.yml
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml up -d
- name: Sleep for MySQL
run: sleep 120s
shell: bash
- name: Restart Load EC-CUBE to wait for MySQL
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml up -d
- name: Sleep for MySQL
run: sleep 30s
shell: bash
- name: Request home page - MYSQL NO PLUGIN 10000 PRODUCTS
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-no-plugin-10000-home_1.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-no-plugin-10000-home_2.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-no-plugin-10000-home_3.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-no-plugin-10000-home_4.txt
ab -n 100 -c 10 -l http://localhost:8080/ > mysql-no-plugin-10000-home_5.txt
export MY_NO_PLUGIN_HOME_1="$(tail -n +23 mysql-no-plugin-10000-home_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_HOME_2="$(tail -n +23 mysql-no-plugin-10000-home_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_HOME_3="$(tail -n +23 mysql-no-plugin-10000-home_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_HOME_4="$(tail -n +23 mysql-no-plugin-10000-home_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_HOME_5="$(tail -n +23 mysql-no-plugin-10000-home_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_HOME_RPS_1="$(tail -n +20 mysql-no-plugin-10000-home_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_HOME_RPS_2="$(tail -n +20 mysql-no-plugin-10000-home_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_HOME_RPS_3="$(tail -n +20 mysql-no-plugin-10000-home_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_HOME_RPS_4="$(tail -n +20 mysql-no-plugin-10000-home_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_HOME_RPS_5="$(tail -n +20 mysql-no-plugin-10000-home_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$MY_NO_PLUGIN_HOME_1 + $MY_NO_PLUGIN_HOME_2 + $MY_NO_PLUGIN_HOME_3 + $MY_NO_PLUGIN_HOME_4 + $MY_NO_PLUGIN_HOME_5" | bc -l)
RPS_SUM=$(echo "$MY_NO_PLUGIN_HOME_RPS_1 + $MY_NO_PLUGIN_HOME_RPS_2 + $MY_NO_PLUGIN_HOME_RPS_3 + $MY_NO_PLUGIN_HOME_RPS_4 + $MY_NO_PLUGIN_HOME_RPS_5" | bc -l)
COUNT=5
export MSQL_NO_PLUGIN_10000_HOME_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export MSQL_NO_PLUGIN_10000_HOME_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${MSQL_NO_PLUGIN_10000_HOME_RESULT}"
echo "REQUESTS PER SECOND AVG: ${MSQL_NO_PLUGIN_10000_HOME_RPS_RESULT}"
echo "MSQL_NO_PLUGIN_10000_HOME_RESULT=${MSQL_NO_PLUGIN_10000_HOME_RESULT}" >> $GITHUB_ENV
echo "MSQL_NO_PLUGIN_10000_HOME_RPS_RESULT=${MSQL_NO_PLUGIN_10000_HOME_RPS_RESULT}" >> $GITHUB_ENV
- name: Request list page - MYSQL NO PLUGIN 10000 PRODUCTS
run: |
sudo apt-get install apache2-utils
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-no-plugin-10000-list_1.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-no-plugin-10000-list_2.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-no-plugin-10000-list_3.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-no-plugin-10000-list_4.txt
ab -n 100 -c 10 -l http://localhost:8080/products/list > mysql-no-plugin-10000-list_5.txt
export MY_NO_PLUGIN_LIST_1="$(tail -n +23 mysql-no-plugin-10000-list_1.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_LIST_2="$(tail -n +23 mysql-no-plugin-10000-list_2.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_LIST_3="$(tail -n +23 mysql-no-plugin-10000-list_3.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_LIST_4="$(tail -n +23 mysql-no-plugin-10000-list_4.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_LIST_5="$(tail -n +23 mysql-no-plugin-10000-list_5.txt | grep -o -P '(?<=:).*(?=\[ms\])')"
export MY_NO_PLUGIN_LIST_RPS_1="$(tail -n +20 mysql-no-plugin-10000-list_1.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_LIST_RPS_2="$(tail -n +20 mysql-no-plugin-10000-list_2.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_LIST_RPS_3="$(tail -n +20 mysql-no-plugin-10000-list_3.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_LIST_RPS_4="$(tail -n +20 mysql-no-plugin-10000-list_4.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
export MY_NO_PLUGIN_LIST_RPS_5="$(tail -n +20 mysql-no-plugin-10000-list_5.txt | grep -o -P '(?<=Requests per second:).*(?=\[#/sec\])')"
SUM=$(echo "$MY_NO_PLUGIN_LIST_1 + $MY_NO_PLUGIN_LIST_2 + $MY_NO_PLUGIN_LIST_3 + $MY_NO_PLUGIN_LIST_4 + $MY_NO_PLUGIN_LIST_5" | bc -l)
RPS_SUM=$(echo "$MY_NO_PLUGIN_LIST_RPS_1 + $MY_NO_PLUGIN_LIST_RPS_2 + $MY_NO_PLUGIN_LIST_RPS_3 + $MY_NO_PLUGIN_LIST_RPS_4 + $MY_NO_PLUGIN_LIST_RPS_5" | bc -l)
COUNT=5
export MSQL_NO_PLUGIN_10000_LIST_RESULT=$(echo "scale=4; 1.0 * $SUM / $COUNT" | bc -l)
export MSQL_NO_PLUGIN_10000_LIST_RPS_RESULT=$(echo "scale=4; 1.0 * $RPS_SUM / $COUNT" | bc -l)
echo "TIME PER REQUEST AVG: ${MSQL_NO_PLUGIN_10000_LIST_RESULT}"
echo "REQUESTS PER SECOND AVG: ${MSQL_NO_PLUGIN_10000_LIST_RPS_RESULT}"
echo "MSQL_NO_PLUGIN_10000_LIST_RESULT=${MSQL_NO_PLUGIN_10000_LIST_RESULT}" >> $GITHUB_ENV
echo "MSQL_NO_PLUGIN_10000_LIST_RPS_RESULT=${MSQL_NO_PLUGIN_10000_LIST_RPS_RESULT}" >> $GITHUB_ENV
- name: Drop MYSQL ECCUBE for 4.2.1-20230116
run: |
docker-compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.bench.mysql.yml down -v
- name: 'Cleanup build folder'
run: |
sudo ls -la ./
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
sudo ls -la ./
- name: Bundle All Average Results to CSV
run: |
echo "Pattern, DB, Page, PLUGIN - TIME PER REQUEST, NO PLUGIN - TIME PER REQUEST, PLUGIN - REQUESTS PER SECOND,NO PLUGIN - REQUESTS PER SECOND" >> total.csv
echo "Base Install Result, PGSQL, TOP, ${PSQL_PLUGIN_BASE_HOME_RESULT}, ${PSQL_NO_PLUGIN_BASE_HOME_RESULT}, ${PSQL_PLUGIN_BASE_HOME_RPS_RESULT}, ${PSQL_NO_PLUGIN_BASE_HOME_RPS_RESULT}" >> total.csv
echo "Base Install Result, PGSQL, LIST, ${PSQL_PLUGIN_BASE_LIST_RESULT}, ${PSQL_NO_PLUGIN_BASE_LIST_RESULT}, ${PSQL_PLUGIN_BASE_LIST_RPS_RESULT}, ${PSQL_NO_PLUGIN_BASE_LIST_RPS_RESULT}" >> total.csv
echo "Base Install Result, MYSQL, TOP, ${MSQL_PLUGIN_BASE_HOME_RESULT}, ${MSQL_NO_PLUGIN_BASE_HOME_RESULT}, ${MSQL_PLUGIN_BASE_HOME_RPS_RESULT}, ${MSQL_NO_PLUGIN_BASE_HOME_RPS_RESULT}" >> total.csv
echo "Base Install Result, MYSQL, LIST, $MSQL_PLUGIN_BASE_LIST_RESULT, ${MSQL_NO_PLUGIN_BASE_LIST_RESULT}, ${MSQL_PLUGIN_BASE_LIST_RPS_RESULT}, ${MSQL_NO_PLUGIN_BASE_LIST_RPS_RESULT}" >> total.csv
echo "10000 Product Result, PGSQL, TOP, ${PG_PLUGIN_10000_HOME_RESULT}, ${PG_NO_PLUGIN_10000_HOME_RESULT}, ${PG_PLUGIN_10000_HOME_RPS_RESULT}, ${PG_NO_PLUGIN_10000_HOME_RPS_RESULT}" >> total.csv
echo "10000 Product Result, PGSQL, LIST, ${PG_PLUGIN_10000_LIST_RESULT}, ${PG_NO_PLUGIN_10000_LIST_RESULT}, ${PG_PLUGIN_10000_LIST_RPS_RESULT}, ${PG_NO_PLUGIN_10000_LIST_RPS_RESULT}" >> total.csv
echo "10000 Product Result, MYSQL, TOP, ${MSQL_PLUGIN_10000_HOME_RESULT}, ${MSQL_NO_PLUGIN_10000_HOME_RESULT}, ${MSQL_PLUGIN_10000_HOME_RPS_RESULT}, ${MSQL_NO_PLUGIN_10000_HOME_RPS_RESULT}" >> total.csv
echo "10000 Product Result, MYSQL, LIST, ${MSQL_PLUGIN_10000_LIST_RESULT}, ${MSQL_NO_PLUGIN_10000_LIST_RESULT}, ${MSQL_PLUGIN_10000_LIST_RPS_RESULT}, ${MSQL_NO_PLUGIN_10000_LIST_RPS_RESULT}" >> total.csv
# Upload Evidence
## FINALISE
- name: Upload complete evidence (ALL)
if: always()
uses: actions/upload-artifact@v2
with:
name: ab-${{ env.ARTIFACT_NAME }}-complete
path: total.csv