-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
백엔드 TPS 관련 로그 #596
Comments
10월 4일(금)성능 테스트 도구 선정
|
스크립트import static net.grinder.script.Grinder.grinder
import static org.junit.Assert.*
import static org.hamcrest.Matchers.*
import net.grinder.script.GTest
import net.grinder.script.Grinder
import net.grinder.scriptengine.groovy.junit.GrinderRunner
import net.grinder.scriptengine.groovy.junit.annotation.BeforeProcess
import net.grinder.scriptengine.groovy.junit.annotation.BeforeThread
// import static net.grinder.util.GrinderUtils.* // You can use this if you're using nGrinder after 3.2.3
import org.junit.Before
import org.junit.BeforeClass
import org.junit.Test
import org.junit.runner.RunWith
import org.ngrinder.http.HTTPRequest
import org.ngrinder.http.HTTPRequestControl
import org.ngrinder.http.HTTPResponse
import org.ngrinder.http.cookie.Cookie
import org.ngrinder.http.cookie.CookieManager
/**
* A simple example using the HTTP plugin that shows the retrieval of a single page via HTTP.
*
* This script is automatically generated by ngrinder.
*
* @author admin
*/
@RunWith(GrinderRunner)
class TestRunner {
public static GTest test
public static HTTPRequest request
public static Map<String, String> headers = [:]
public static Map<String, Object> params = [:]
public static List<Cookie> cookies = []
@BeforeProcess
public static void beforeProcess() {
HTTPRequestControl.setConnectionTimeout(300000)
test = new GTest(1, "[dev.api.devel-up.co.kr](http://dev.api.devel-up.co.kr/)")
request = new HTTPRequest()
[grinder.logger.info](http://grinder.logger.info/)("before process.")
}
@BeforeThread
public void beforeThread() {
test.record(this, "test")
grinder.statistics.delayReports = true
[grinder.logger.info](http://grinder.logger.info/)("before thread.")
}
@Before
public void before() {
request.setHeaders(headers)
CookieManager.addCookies(cookies)
[grinder.logger.info](http://grinder.logger.info/)("before. init headers and cookies")
}
@Test
public void test() {
long beforeTime = System.currentTimeMillis()
HTTPResponse response = request.GET("https://dev.api.devel-up.co.kr/solutions", params)
long afterTime = System.currentTimeMillis()
long secDiffTime = (afterTime - beforeTime) / 1000
if (response.statusCode == 301 || response.statusCode == 302) {
grinder.logger.warn("Warning. The response may not be correct. The response code was {}.", response.statusCode)
} else {
assertThat(response.statusCode, is(200))
assertThat((int) secDiffTime, lessThanOrEqualTo(1000))
}
}
} |
개발서버 - 분석 2총 Vuser가 500일 때 |
DB가 병목 구간이다 |
--- 여기까지 dev 서버 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
논의가 필요한 내용
백엔드 TPS 관련 논의 사항 업로드
작업 현황 기록용
The text was updated successfully, but these errors were encountered: