TPS 문의 드립니다.(nGrinder 3.3)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

TPS 문의 드립니다.(nGrinder 3.3)

조성균
안녕하세요^^ ngrinder 잘 쓰고 있습니다. 감사합니다.

문의 드릴 내용은 TPS 를 구하는 시간에 관한 얘기 인데요.
TPS 에서 시간이

  1) test.record 되는 함수의 시작과 끝 시간을 합한 시간 인지,
  2) Script 전체 실행 시간인지 궁금합니다.

실험 결과로는 2) 번인 것 같습니다.

test.record 를 request101:HTTPRequest 의 POST method 로 지정한 script에서,
grinder.sleep 의 시간을 2000(ms), 500(ms)로 각각 테스트를 해본 결과
TPS 가 0.4, 0.87 로 증가를 했습니다.


record 는 transaction 수만 기록 하고,
시간은 총 script 실행 시간으로 보면 될까요?




=== script ====

class GetAndPostFilter(Test.InstrumentationFilter):
  def matches(self, method):
    return method.name in ["POST"]

 request101 = HTTPRequest(url=url0, headers=headers0)
 test.record(request101, GetAndPostFilter())

 class TestRunner:
        def page1(self):
                result = request101.POST(
        def page2(self):
                result = request101.POST(
        def page3(self):
                result = request101.POST(
        def page4(self):
                result = request101.POST(

case 1)

        def __call__(self):
        grinder.sleep(2000)
    self.page1()
    grinder.sleep(2000)
    self.page2()      
    grinder.sleep(2000)
    self.page3()      
    grinder.sleep(2000)
    self.page4()      

case 2) sleep 시간만 바꿈
 
  def __call__(self):
        grinder.sleep(500)
    self.page1()
    grinder.sleep(500)
    self.page2()      
    grinder.sleep(500)
    self.page3()      
    grinder.sleep(500)
    self.page4()      




result case1)

             Tests        Errors       Mean Test    Test Time    TPS          Mean         Response     Response     Mean time to Mean time to Mean time to
                                       Time (ms)    Standard                  response     bytes per    errors       resolve host establish    first byte  
                                                    Deviation                 length       second                                 connection                
                                                    (ms)                                                                                                    

Test 1       4            0            388.75       190.23       0.40         148.75       59.44        0            260.00       278.00       375.00        "Message POST"

Totals       4            0            388.75       190.23       0.40         148.75       59.44        0            260.00       278.00       375.00      


result case2)

             Tests        Errors       Mean Test    Test Time    TPS          Mean         Response     Response     Mean time to Mean time to Mean time to
                                       Time (ms)    Standard                  response     bytes per    errors       resolve host establish    first byte  
                                                    Deviation                 length       second                                 connection                
                                                    (ms)                                                                                                    

Test 1       4            0            390.50       172.37       0.87         148.75       129.01       0            243.00       263.00       384.25        "Message POST"

Totals       4            0            390.50       172.37       0.87         148.75       129.01       0            243.00       263.00       384.25  
Reply | Threaded
Open this post in threaded view
|

Re: TPS 문의 드립니다.(nGrinder 3.3)

junoyoon
Administrator
TPS는 초당 트랜잭션 개수입니다.
아주 단순하게 본다면 즉 10초간 스크립트가 실행되었다면 그 기간동안 실행된 트랜잭션(record 로 레코딩된)의 개수를 평균하시면 됩니다.
실제로는 각 Sampling Rate 별로 최근 1~5초간에 실행되었던 트랜잭션을 초로 나눠서 초당 트랜잭션을 계산합니다. (이러한 자세한 내용은 이해 안하시는 편이.. ^^)


2014-05-15 14:15 GMT+09:00 조성균 [via ngrinder] <[hidden email]>:
안녕하세요^^ ngrinder 잘 쓰고 있습니다. 감사합니다.

문의 드릴 내용은 TPS 를 구하는 시간에 관한 얘기 인데요.
TPS 에서 시간이

  1) test.record 되는 함수의 시작과 끝 시간을 합한 시간 인지,
  2) Script 전체 실행 시간인지 궁금합니다.

실험 결과로는 2) 번인 것 같습니다.

test.record 를 request101:HTTPRequest 의 POST method 로 지정한 script에서,
grinder.sleep 의 시간을 2000(ms), 500(ms)로 각각 테스트를 해본 결과
TPS 가 0.4, 0.87 로 증가를 했습니다.


record 는 transaction 수만 기록 하고,
시간은 총 script 실행 시간으로 보면 될까요?




=== script ====

class GetAndPostFilter(Test.InstrumentationFilter):
  def matches(self, method):
    return method.name in ["POST"]

 request101 = HTTPRequest(url=url0, headers=headers0)
 test.record(request101, GetAndPostFilter())

 class TestRunner:
        def page1(self):
                result = request101.POST(
        def page2(self):
                result = request101.POST(
        def page3(self):
                result = request101.POST(
        def page4(self):
                result = request101.POST(

case 1)

        def __call__(self):
        grinder.sleep(2000)
    self.page1()
    grinder.sleep(2000)
    self.page2()      
    grinder.sleep(2000)
    self.page3()      
    grinder.sleep(2000)
    self.page4()      

case 2) sleep 시간만 바꿈
 
  def __call__(self):
        grinder.sleep(500)
    self.page1()
    grinder.sleep(500)
    self.page2()      
    grinder.sleep(500)
    self.page3()      
    grinder.sleep(500)
    self.page4()      




result case1)

             Tests        Errors       Mean Test    Test Time    TPS          Mean         Response     Response     Mean time to Mean time to Mean time to
                                       Time (ms)    Standard                  response     bytes per    errors       resolve host establish    first byte  
                                                    Deviation                 length       second                                 connection                
                                                    (ms)                                                                                                    

Test 1       4            0            388.75       190.23       0.40         148.75       59.44        0            260.00       278.00       375.00        "Message POST"

Totals       4            0            388.75       190.23       0.40         148.75       59.44        0            260.00       278.00       375.00      


result case2)

             Tests        Errors       Mean Test    Test Time    TPS          Mean         Response     Response     Mean time to Mean time to Mean time to
                                       Time (ms)    Standard                  response     bytes per    errors       resolve host establish    first byte  
                                                    Deviation                 length       second                                 connection                
                                                    (ms)                                                                                                    

Test 1       4            0            390.50       172.37       0.87         148.75       129.01       0            243.00       263.00       384.25        "Message POST"

Totals       4            0            390.50       172.37       0.87         148.75       129.01       0            243.00       263.00       384.25  


If you reply to this email, your message will be added to the discussion below:
http://ngrinder.642.n7.nabble.com/TPS-nGrinder-3-3-tp1534.html
To start a new topic under ngrinder-user-kr, email [hidden email]
To unsubscribe from ngrinder-user-kr, click here.
NAML