Artillery 시나리오

Alex·2024년 9월 25일
0

성능 개선

목록 보기
9/9
intj
intp
entj
entp
infj
infp
enfj
enfp
istj
isfj
estj
esfj
istp
isfp
estp
esfp
config:
  target: 'https://pioneerfuve.store:8443'
  phases:
    - duration: 60
      arrivalRate: 20
  payload:
    path: "mbti.csv"
    fields:
      -"type"
  scenarios:
    - flow:
        - get:
            url: '/mbti/{type}'
            --> url: '/mbti/result/{{ type }}'
            

테스트를 초당 20번, 40번, 60번, 70번씩 API를 호출하도록 했는데 서버에서 OOM이 발생하지는 않았다.

60초간 5000~6000번의 API 요청을 보내도 OOM이 뜨지 않았다. 우리 서버에서는 이 정도 규모의 API 호출이 발생하지 않는다. 그렇다면, 이게 원인은 아닌 것 같다.

Mbti를 계산하는 api에 대한 부하테스트를 해보자.

config:
  target: 'https://pioneerfuve.store:8443'
  phases:
    - duration: 60
      arrivalRate: 100
      rampTo: 200
  payload:
    path: "mbti.csv"
    fields:
    - "q1"
    - "q2"
    - "q3"
    - "q4"
    - "q5"
    - "q6"
    - "q7"
    - "q8"
    - "q9"
    - "q10"
    - "q11"
    - "q12"
scenarios:
    - flow:
        - post:
            url: '/mbti/result'
            json:
              q1: "{{ q1 }}"
              q2: "{{ q2 }}"
              q3: "{{ q3 }}"
              q4: "{{ q4 }}"
              q5: "{{ q5 }}"
              q6: "{{ q6 }}"
              q7: "{{ q7 }}"
              q8: "{{ q8 }}"
              q9: "{{ q9 }}"
              q10: "{{ q10 }}"
              q11: "{{ q11 }}"
              q12: "{{ q12 }}"

Binder 성능 테스트

config:
  target: 'http://3.38.124.241:8080'
  phases:
    - duration: 60
      arrivalRate: 50
  payload:
    - path: "search.csv"
      fields:
      - "longitude"
      - "latitude"
      - "targetlongitue"
      - "targetlatitude"
      - "keyword"
      - "address"
scenarios:
  - flow:
      - get:
          url: '/search/bins/keyword?longitude={{ longitude }}&latitude={{ latitude }}&targetLongitude={{ targetlongitue }}&targetLatitude={{ targetlatitude }}&keyword={{ keyword }}&address={{ address }}'
          headers:
            Cookie: "_ga=GA1.1.503825361.1726210455; visited=true; Authorization=eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6ImR1c2doNzAzMTJAZ21haWwuY29tIiwicm9sZSI6IlJPTEVfQURNSU4iLCJpYXQiOjE3Mjg2NTYwNzMsImV4cCI6MTcyOTI2MDg3M30.wrZe5F3jM34pbJpiQ1YTx_xNmmc-l2JjMvwIemvyFf303RAv3G0oqtMhNfc6FPdKyUqr-PYufBz8259drY64MQ; _ga_ZEWF6HWTJB=GS1.1.1728655192.64.1.1728656075.0.0.0"
            
            
            
            
config:
 target: 'http://3.38.124.241:8080'
 phases:
   - duration: 60
     arrivalRate: 50
 payload:
   - path: "searchId.csv"
     fields:
     - "searchId"
scenarios:
 - flow:
     - get:
         url: '/searchlog?lastSearchLogId={{ searchId }} '
         headers:
           Cookie: "_ga=GA1.1.503825361.1726210455; visited=true; Authorization=eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6ImR1c2doNzAzMTJAZ21haWwuY29tIiwicm9sZSI6IlJPTEVfQURNSU4iLCJpYXQiOjE3Mjg2NTYwNzMsImV4cCI6MTcyOTI2MDg3M30.wrZe5F3jM34pbJpiQ1YTx_xNmmc-l2JjMvwIemvyFf303RAv3G0oqtMhNfc6FPdKyUqr-PYufBz8259drY64MQ; _ga_ZEWF6HWTJB=GS1.1.1728655192.64.1.1728656075.0.0.0"
config:
 target: 'http://3.38.124.241:8080'
 phases:
   - duration: 60
     arrivalRate: 50
 payload:
   - path: "search.csv"
     fields:
     - "longitude"
     - "latitude"
     - "radius"
scenarios:
 - flow:
     - get:
         url: '/search/bins?longitude={{ longitude }}&latitude={{ latitude }}&radius={{ radius }}'
profile
답을 찾기 위해서 노력하는 사람

0개의 댓글