Skip to content

Commit

Permalink
add load test and fix ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa committed Dec 11, 2023
1 parent ae8eab6 commit 587d4f6
Show file tree
Hide file tree
Showing 18 changed files with 220 additions and 18 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ lint:

deploy:
#deploy goes here


load_test:
./run_locust.sh

all:
install lint test format deploy
install lint test format deploy
12 changes: 8 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,23 @@ def get_completion(prompt, model="gpt-3.5-turbo"):
The output should be a list of 3 song names.
And with each song, include the artist name and the song's genre.
And art's duration, tempo. And the song's mood, best lyrics.
And song's release year, duration, tempo, mood, best lyrics.
And why I should listen to it.
The reason should be related to user's preference.
The user's preference is: {prompt}
The preference does not necessarily has a very explicit idea about music.
Think about user's sentiment and background to understand the preference.
At the end, say some warm words to the user.
At the very end. Say
"Thank you for using our service.
Keep interacting with me if you need more songs."
The user's preference is: {prompt}
The preference does not necessarily has a very explicit idea about music.
Think about user's sentiment and background to understand the preference.
Don't print of bulk of responses, make it easier to read with new lines.
format your answer in html string, but don't use html tags, it's just a text box in browser.

Check failure on line 116 in app.py

View workflow job for this annotation

GitHub Actions / build (3.10)

Ruff (E501)

app.py:116:89: E501 Line too long (100 > 88 characters)

Check failure on line 116 in app.py

View workflow job for this annotation

GitHub Actions / build (3.11)

Ruff (E501)

app.py:116:89: E501 Line too long (100 > 88 characters)
"""
messages = [{"role": "user", "content": prompt_complete}]
try:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Count,Message,Traceback,Nodes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Method,Name,Error,Occurrences
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Type,Name,Request Count,Failure Count,Median Response Time,Average Response Time,Min Response Time,Max Response Time,Average Content Size,Requests/s,Failures/s,50%,66%,75%,80%,90%,95%,98%,99%,99.9%,99.99%,100%
GET,/,2180,0,43,359.5988480678328,22.173691999341827,2956.5058600055636,2317.0,36.50567363743122,0.0,43,290,350,450,1400,1600,1600,1700,2700,3000,3000
GET,/chatbot,2101,0,43,389.53438699998986,20.550746005028486,3054.555706999963,3870.0,35.18276161112064,0.0,43,320,370,880,1500,1600,1700,1800,3000,3100,3100
GET,/stats,2148,0,42,358.2460131400624,20.588082996255253,2937.3541390013997,2745.0,35.96981053816618,0.0,42,290,350,450,1500,1600,1700,1700,2700,2900,2900
,Aggregated,6429,0,42,368.9297981178594,20.550746005028486,3054.555706999963,2967.520609737129,107.65824578671804,0.0,42,300,360,670,1500,1600,1700,1700,2900,3100,3100
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Timestamp,User Count,Type,Name,Requests/s,Failures/s,50%,66%,75%,80%,90%,95%,98%,99%,99.9%,99.99%,100%,Total Request Count,Total Failure Count,Total Median Response Time,Total Average Response Time,Total Min Response Time,Total Max Response Time,Total Average Content Size
1702231702,0,,Aggregated,0.000000,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,0,0,0,0.0,0,0,0
1702231703,20,,Aggregated,0.000000,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,0,0,0,0.0,0,0,0
1702231705,40,,Aggregated,0.000000,0.000000,1800,1900,1900,3000,3000,3000,3000,3000,3000,3000,3000,20,0,1800.0,2028.9998967509746,1757.3219849946327,2956.9763429972227,3101.45
1702231706,60,,Aggregated,5.500000,0.000000,1800,1800,1900,1900,2700,3000,3000,3000,3000,3000,3000,42,0,1800.0,1859.516715072026,1332.9090440020082,2956.9763429972227,3064.095238095238
1702231707,80,,Aggregated,5.500000,0.000000,1600,1600,1800,1800,1900,3000,3000,3000,3000,3000,3000,72,0,1600.0,1529.539190292073,40.313031000550836,2956.9763429972227,2965.4444444444443
1702231708,100,,Aggregated,9.250000,0.000000,1500,1600,1600,1800,1900,2700,3000,3000,3000,3000,3000,107,0,1500.0,1368.3775192714556,40.313031000550836,2956.9763429972227,2972.9906542056074
1702231710,120,,Aggregated,12.000000,0.000000,1500,1500,1600,1600,1800,2600,3000,3000,3000,3000,3000,154,0,1500.0,1222.182392084789,31.835514004342258,2956.9763429972227,2938.2662337662337
1702231711,140,,Aggregated,15.285714,0.000000,1500,1500,1600,1600,1800,2500,3000,3000,3000,3000,3000,199,0,1500.0,1177.8139640152572,31.835514004342258,2956.9763429972227,2918.035175879397
1702231713,160,,Aggregated,18.625000,0.000000,1500,1500,1600,1600,1800,1900,2700,3000,3000,3000,3000,257,0,1500.0,1076.5092382725322,31.835514004342258,2956.9763429972227,2940.315175097276
1702231714,180,,Aggregated,19.900000,0.000000,1300,1500,1600,1600,1600,1800,2700,3000,3000,3000,3000,331,0,1300.0,990.7391034502795,31.835514004342258,2956.9763429972227,2947.5196374622356
1702231715,200,,Aggregated,25.700000,0.000000,1000,1500,1600,1600,1600,1800,2600,2700,3000,3000,3000,413,0,1000.0,920.2422546611268,31.835514004342258,2956.9763429972227,2940.5593220338983
1702231717,220,,Aggregated,31.600000,0.000000,400,1500,1600,1600,1600,1800,2500,2700,3000,3000,3000,497,0,400.0,874.1851096599627,29.240448006021325,2956.9763429972227,2944.5110663983905
1702231718,240,,Aggregated,37.600000,0.000000,380,1500,1600,1600,1600,1700,1900,2700,3000,3000,3000,600,0,380.0,829.2582617083463,20.83126599609386,2956.9763429972227,2968.06
1702231720,260,,Aggregated,52.600000,0.000000,340,1500,1500,1600,1600,1700,1900,2700,3000,3000,3000,699,0,340.0,814.5245423747652,20.83126599609386,2956.9763429972227,2961.483547925608
1702231721,280,,Aggregated,49.300000,0.000000,340,1300,1500,1600,1600,1700,1900,2700,3000,3000,3000,796,0,340.0,806.9282536042411,20.83126599609386,2956.9763429972227,2951.079145728643
1702231723,300,,Aggregated,58.900000,0.000000,340,1200,1500,1600,1600,1700,2600,2600,3000,3000,3000,904,0,340.0,813.4176591194237,20.83126599609386,2956.9763429972227,2963.102876106195
1702231724,320,,Aggregated,59.700000,0.000000,340,1300,1500,1600,1600,1700,2600,2600,3000,3000,3000,1022,0,340.0,818.145066013616,20.83126599609386,2956.9763429972227,2965.774951076321
1702231725,340,,Aggregated,61.600000,0.000000,350,1200,1500,1500,1600,1700,2500,2600,3000,3000,3000,1140,0,350.0,816.2532251630438,20.83126599609386,2956.9763429972227,2972.409649122807
1702231727,360,,Aggregated,70.200000,0.000000,340,1200,1500,1500,1600,1600,1900,2600,3000,3000,3000,1273,0,340.0,812.5733835128725,20.83126599609386,2956.9763429972227,2973.750196386489
1702231728,380,,Aggregated,72.700000,0.000000,350,1200,1500,1500,1600,1600,1800,2600,3000,3000,3000,1414,0,350.0,819.3403092347634,20.83126599609386,2956.9763429972227,2977.0997171145686
1702231730,400,,Aggregated,78.500000,0.000000,340,1200,1400,1500,1600,1600,1800,2600,3000,3000,3000,1530,0,340.0,806.5274439489839,20.83126599609386,2956.9763429972227,2974.256209150327
1702231731,420,,Aggregated,81.400000,0.000000,400,1200,1500,1500,1600,1600,1800,2600,3000,3100,3100,1689,0,400.0,817.0113516376211,20.83126599609386,3054.555706999963,2976.0373001776197
1702231733,440,,Aggregated,83.700000,0.000000,400,1300,1500,1500,1600,1700,1800,2600,3000,3100,3100,1838,0,400.0,825.0909730603282,20.83126599609386,3054.555706999963,2971.811207834603
1702231734,460,,Aggregated,89.300000,0.000000,440,1300,1500,1500,1600,1700,1800,2600,3000,3100,3100,2046,0,440.0,824.7461738865562,20.83126599609386,3054.555706999963,2972.86265884653
1702231736,480,,Aggregated,104.600000,0.000000,450,1300,1400,1500,1600,1600,1800,2600,3000,3100,3100,2178,0,450.0,831.7970763048386,20.83126599609386,3054.555706999963,2978.568411386593
1702231737,500,,Aggregated,93.600000,0.000000,680,1300,1500,1500,1600,1700,1800,2600,3000,3100,3100,2354,0,680.0,857.8899975887326,20.83126599609386,3054.555706999963,2980.3254035683944
1702231738,500,,Aggregated,102.300000,0.000000,450,1300,1500,1500,1600,1700,1800,2600,3000,3100,3100,2674,0,450.0,836.5255145137825,20.83126599609386,3054.555706999963,2982.4962602842184
1702231739,500,,Aggregated,106.900000,0.000000,400,1200,1400,1500,1600,1700,1700,2500,3000,3100,3100,2810,0,400.0,797.7949918981683,20.588082996255253,3054.555706999963,2980.6188612099645
1702231740,500,,Aggregated,97.100000,0.000000,380,1200,1400,1500,1600,1600,1700,1900,3000,3100,3100,2950,0,380.0,761.6890013246931,20.588082996255253,3054.555706999963,2982.1749152542375
1702231741,500,,Aggregated,126.600000,0.000000,360,1200,1400,1500,1600,1600,1700,1900,3000,3100,3100,3117,0,360.0,722.7790171080377,20.588082996255253,3054.555706999963,2979.9108116778953
1702231742,500,,Aggregated,129.900000,0.000000,350,1100,1300,1500,1600,1600,1700,1800,3000,3100,3100,3303,0,350.0,684.2679163441408,20.588082996255253,3054.555706999963,2977.1223130487438
1702231743,500,,Aggregated,131.000000,0.000000,340,890,1300,1400,1600,1600,1700,1800,3000,3100,3100,3471,0,340.0,652.8492930892324,20.588082996255253,3054.555706999963,2978.1823681936044
1702231744,500,,Aggregated,144.300000,0.000000,340,700,1300,1400,1600,1600,1700,1800,3000,3100,3100,3632,0,340.0,625.4646463358368,20.588082996255253,3054.555706999963,2981.3937224669603
1702231745,500,,Aggregated,147.500000,0.000000,330,660,1300,1400,1600,1600,1700,1800,3000,3100,3100,3785,0,330.0,601.555963049868,20.588082996255253,3054.555706999963,2978.031175693527
1702231746,500,,Aggregated,144.900000,0.000000,330,440,1200,1400,1600,1600,1700,1800,3000,3100,3100,3949,0,330.0,578.0182191582087,20.588082996255253,3054.555706999963,2980.3927576601673
1702231747,500,,Aggregated,159.600000,0.000000,320,400,1200,1300,1600,1600,1700,1800,3000,3100,3100,4130,0,320.0,554.2438711640998,20.588082996255253,3054.555706999963,2979.1513317191284
1702231748,500,,Aggregated,163.400000,0.000000,300,380,1100,1300,1600,1600,1700,1800,3000,3100,3100,4296,0,300.0,534.1722549766616,20.588082996255253,3054.555706999963,2974.3901303538173
1702231749,500,,Aggregated,164.900000,0.000000,290,370,1100,1300,1600,1600,1700,1800,3000,3100,3100,4468,0,290.0,515.0315449435378,20.588082996255253,3054.555706999963,2972.3659355416294
1702231750,500,,Aggregated,178.400000,0.000000,280,360,1000,1300,1500,1600,1700,1800,3000,3100,3100,4626,0,280.0,498.7775230944115,20.588082996255253,3054.555706999963,2970.4208819714654
1702231751,500,,Aggregated,162.700000,0.000000,270,350,880,1200,1500,1600,1700,1800,3000,3100,3100,4788,0,270.0,483.1314244769868,20.588082996255253,3054.555706999963,2969.8834586466164
1702231752,500,,Aggregated,165.500000,0.000000,210,350,700,1200,1500,1600,1700,1800,3000,3100,3100,4972,0,210.0,466.5928818416773,20.588082996255253,3054.555706999963,2971.7282783588093
1702231753,500,,Aggregated,167.000000,0.000000,120,340,670,1200,1500,1600,1700,1800,2900,3100,3100,5137,0,120.0,452.7298640340372,20.588082996255253,3054.555706999963,2970.37531633249
1702231754,500,,Aggregated,166.700000,0.000000,59,340,450,1200,1500,1600,1700,1800,2900,3100,3100,5294,0,59,440.36508314617623,20.588082996255253,3054.555706999963,2970.447676615036
1702231755,500,,Aggregated,166.700000,0.000000,51,330,440,1100,1500,1600,1700,1800,2900,3100,3100,5469,0,51,427.4216866434136,20.588082996255253,3054.555706999963,2969.1274456024867
1702231756,500,,Aggregated,165.200000,0.000000,48,330,400,1100,1500,1600,1700,1700,2900,3100,3100,5627,0,48,416.38187522618466,20.588082996255253,3054.555706999963,2967.1238670694866
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Count,Message,Traceback,Nodes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Method,Name,Error,Occurrences
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Type,Name,Request Count,Failure Count,Median Response Time,Average Response Time,Min Response Time,Max Response Time,Average Content Size,Requests/s,Failures/s,50%,66%,75%,80%,90%,95%,98%,99%,99.9%,99.99%,100%
GET,/,261,0,1400.0,1204.084059946222,99.03951999876881,3239.0291300034733,2317.0,13.583599034614576,0.0,1400,1600,1700,1700,1800,2900,2900,2900,3200,3200,3200
GET,/chatbot,236,0,1300.0,1138.2661452927573,40.286973999172915,2983.3693800028414,3870.0,12.282488015973334,0.0,1300,1600,1700,1700,1800,2900,2900,2900,3000,3000,3000
GET,/stats,238,0,1300.0,1176.3779153991914,39.561327001138125,3239.936122998188,2745.0,12.386576897464632,0.0,1300,1600,1600,1700,1900,2900,2900,3000,3200,3200,3200
,Aggregated,735,0,1300.0,1173.979175238181,39.561327001138125,3239.936122998188,2954.2408163265304,38.25266394805254,0.0,1300,1600,1600,1700,1800,2900,2900,2900,3200,3200,3200
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Timestamp,User Count,Type,Name,Requests/s,Failures/s,50%,66%,75%,80%,90%,95%,98%,99%,99.9%,99.99%,100%,Total Request Count,Total Failure Count,Total Median Response Time,Total Average Response Time,Total Min Response Time,Total Max Response Time,Total Average Content Size
1702231813,0,,Aggregated,0.000000,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,0,0,0,0.0,0,0,0
1702231814,20,,Aggregated,0.000000,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,0,0,0,0.0,0,0,0
1702231816,40,,Aggregated,0.000000,0.000000,1400,1500,1600,1600,1600,2600,2600,2600,2600,2600,2600,18,0,1405.9058089987957,1549.3974007230363,1405.9058089987957,2573.774623000645,2953.5555555555557
1702231817,60,,Aggregated,0.000000,0.000000,1600,1700,1700,1700,1900,2600,2900,2900,2900,2900,2900,42,0,1600.0,1685.896798095027,1078.8167909995536,2930.2897809975548,2872.809523809524
1702231819,80,,Aggregated,9.750000,0.000000,1700,1700,1700,1700,1700,2600,2800,2900,2900,2900,2900,75,0,1700.0,1466.3164335601807,39.561327001138125,2930.2897809975548,2886.68
1702231820,100,,Aggregated,8.600000,0.000000,1600,1700,1700,1700,1700,2600,2800,2900,2900,2900,2900,78,0,1600.0,1459.1210126027597,39.561327001138125,2930.2897809975548,2875.74358974359
1702231822,120,,Aggregated,10.714286,0.000000,1600,1700,1700,2600,2900,2900,2900,2900,2900,2900,2900,149,0,1600.0,1572.3237732015436,39.561327001138125,2930.2897809975548,2883.281879194631
1702231823,140,,Aggregated,16.000000,0.000000,1600,1700,1700,1700,2800,2900,2900,2900,2900,2900,2900,196,0,1600.0,1412.213991153127,39.561327001138125,2930.2897809975548,2902.6530612244896
1702231825,160,,Aggregated,16.000000,0.000000,1600,1700,1700,1700,2800,2900,2900,2900,2900,2900,2900,246,0,1600.0,1283.3096406423915,39.561327001138125,2930.2897809975548,2959.487804878049
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Count,Message,Traceback,Nodes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Method,Name,Error,Occurrences
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Type,Name,Request Count,Failure Count,Median Response Time,Average Response Time,Min Response Time,Max Response Time,Average Content Size,Requests/s,Failures/s,50%,66%,75%,80%,90%,95%,98%,99%,99.9%,99.99%,100%
GET,/,275,0,1500.0,1284.0389309307052,26.057177994516678,4589.1034769956605,2317.0,12.851680264233725,0.0,1500,1600,1700,2000,2200,3100,4100,4300,4600,4600,4600
GET,/chatbot,274,0,1500.0,1279.7555988834004,27.552875006222166,5201.217992995225,3870.0,12.804946881454692,0.0,1500,1600,1700,1900,2200,3100,4100,4300,5200,5200,5200
GET,/get?msg=give%20me%20some%20music%20that%20is%20happy,13,0,4600.0,4892.859211770254,3422.9756939967046,6570.111879998876,43.0,0.6075339761274124,0.0,4600,5500,5800,5800,5900,6600,6600,6600,6600,6600,6600
GET,/stats,285,0,1500.0,1331.590005855986,23.60710200446192,5201.826430995425,2745.0,13.319014092024041,0.0,1500,1600,1900,2200,2200,3100,4300,4600,5200,5200,5200
,Aggregated,847,0,1500.0,1354.042575586734,23.60710200446192,6570.111879998876,2928.499409681228,39.58317521383987,0.0,1500,1600,1700,2100,2200,3500,4400,4600,6600,6600,6600
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Timestamp,User Count,Type,Name,Requests/s,Failures/s,50%,66%,75%,80%,90%,95%,98%,99%,99.9%,99.99%,100%,Total Request Count,Total Failure Count,Total Median Response Time,Total Average Response Time,Total Min Response Time,Total Max Response Time,Total Average Content Size
1702233492,0,,Aggregated,0.000000,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,0,0,0,0.0,0,0,0
1702233494,20,,Aggregated,0.000000,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,0,0,0,0.0,0,0,0
1702233495,40,,Aggregated,0.000000,0.000000,1500,1500,1500,2700,2700,2700,2700,2700,2700,2700,2700,19,0,1507.1846840000944,1764.8645743167053,1507.1846840000944,2694.847551007115,3046.842105263158
1702233496,60,,Aggregated,0.000000,0.000000,1600,1600,1600,1600,2700,2700,2700,2700,2700,2700,2700,40,0,1600.0,1665.3800615751607,257.079517999955,2740.2047609939473,3021.05
1702233498,80,,Aggregated,9.750000,0.000000,1600,1600,1600,1600,2700,2700,2700,2700,2700,2700,2700,69,0,1600.0,1523.0639269131539,219.95264799625147,2740.2047609939473,3057.2608695652175
1702233499,100,,Aggregated,8.000000,0.000000,1600,1600,1600,1600,2700,2700,2800,2800,2800,2800,2800,103,0,1600.0,1432.940150466078,187.96851400111336,2767.996734000917,2994.3106796116504
1702233501,120,,Aggregated,10.666667,0.000000,1600,1600,1600,1600,1600,2700,2800,2800,2800,2800,2800,149,0,1600.0,1273.4764762350803,116.13507300353376,2767.996734000917,3038.557046979866
1702233502,140,,Aggregated,17.875000,0.000000,1500,1600,1600,1600,1700,2700,2800,2900,4400,4400,4400,203,0,1500.0,1325.7535612265829,116.13507300353376,4378.584468002373,3017.3940886699506
1702233504,160,,Aggregated,17.600000,0.000000,1500,1600,1600,1600,1700,2700,2800,2900,4600,4600,4600,262,0,1500.0,1210.0160043892522,109.37885499879485,4560.443759000918,2987.091603053435
1702233505,180,,Aggregated,25.800000,0.000000,1400,1600,1600,1600,1700,2700,2800,2900,4600,4600,4600,320,0,1400.0,1139.0047975374046,109.37885499879485,4560.443759000918,2975.3875
1702233507,200,,Aggregated,30.000000,0.000000,1400,1600,1600,1600,1600,2700,2900,4600,5900,5900,5900,387,0,1400.0,1125.1077667828033,109.37885499879485,5880.212313000811,2955.9793281653747
1702233508,220,,Aggregated,33.700000,0.000000,1300,1600,1600,1600,1700,2700,2900,4500,5900,5900,5900,436,0,1300.0,1110.622573506781,109.37885499879485,5880.212313000811,2939.9816513761466
1702233509,240,,Aggregated,33.600000,0.000000,1300,1500,1600,1600,1700,2700,3100,4500,5900,5900,5900,588,0,1300.0,1061.2228226699915,23.60710200446192,5880.212313000811,2933.375850340136
1702233511,260,,Aggregated,33.600000,0.000000,1300,1500,1600,1600,1700,2700,3100,4500,5900,5900,5900,595,0,1300.0,1049.1271321309944,23.60710200446192,5880.212313000811,2933.502521008403
1702233513,280,,Aggregated,44.600000,0.000000,1400,1600,1600,1700,2300,3600,4300,5200,6600,6600,6600,721,0,1400.0,1297.1745834520707,23.60710200446192,6570.111879998876,2921.305131761442
1702233514,0,,Aggregated,41.900000,0.000000,1500,1600,1700,2100,2200,3500,4400,4600,6600,6600,6600,847,0,1500.0,1354.042575586734,23.60710200446192,6570.111879998876,2928.499409681228
32 changes: 32 additions & 0 deletions load_test/locustfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from locust import HttpUser, between, task

# locust -f load_test/locustfile.py --host=https://harmonyharbor.azurewebsites.net


class MyLocustUser(HttpUser):
wait_time = between(1, 5) # Random wait time between 1 and 5 seconds

@task(1)
def execute_query(self):
headers = {"Content-Type": "application/x-www-form-urlencoded"}
data = {
"queryInput": "SELECT * FROM prepared_song_data WHERE time_signature = 4 AND tempo between 100 and 140"

Check failure on line 13 in load_test/locustfile.py

View workflow job for this annotation

GitHub Actions / build (3.10)

Ruff (E501)

load_test/locustfile.py:13:89: E501 Line too long (115 > 88 characters)

Check failure on line 13 in load_test/locustfile.py

View workflow job for this annotation

GitHub Actions / build (3.11)

Ruff (E501)

load_test/locustfile.py:13:89: E501 Line too long (115 > 88 characters)
}
self.client.post("/execute_query", data=data, headers=headers)

@task(10)
def get_bot_response(self):
user_text = "give me some music that is happy"
self.client.get(f"/get?msg={user_text}")

@task(500)
def chatbot(self):
self.client.get("/chatbot")

@task(500)
def stats(self):
self.client.get("/stats")

@task(100)
def index(self):
self.client.get("/")
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ requests==2.31.0
azure-identity
azure-keyvault-secrets
openai
pyspark
pyspark
locust == 2.19.1
5 changes: 5 additions & 0 deletions run_locust.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
TIMESTAMP=$(date +"%Y%m%d%H%M%S")
OUTPUT_FOLDER="load_test/locust_results/output_$TIMESTAMP"
mkdir -p "$OUTPUT_FOLDER"
locust -f load_test/locustfile.py --host=https://harmonyharbor.azurewebsites.net --headless -u 500 -r 20 -t 15m --csv="$OUTPUT_FOLDER"
Loading

0 comments on commit 587d4f6

Please sign in to comment.