JSON

minifier (online) 심플함.

https://www.webtoolkitonline.com/json-minifier.html

 

 

JAVA

AJAX POST 데이터 수신 방법에 대해 지식이 모호 했음

https://stackoverflow.com/questions/15063218/how-to-receive-data-sent-by-ajax-in-a-jsp-file

https://stackoverflow.com/questions/5046930/jquery-send-string-as-post-parameters

https://stackoverflow.com/questions/28046051/jquery-ajax-request-and-jsp-response

 

등을 참고해서 처리 함 (아직도 지식이 모호함. 만족스럽지 않음. 다시 볼것)

 

Java

다음과 같은 오류 발생 - Java 6 + tomcat 7 + thread 25 (=> 800 req / 1 thread) -> 20000 건 처리 시간 63초 

계속 실행하니 다음과 같은 오류가 발생.

INFO: I/O exception (java.net.BindException) caught when processing request to {}->http://127.0.0.1:9443: Address already in use: connect
Jun 3, 2020 10:16:01 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:9443
Jun 3, 2020 10:16:01 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:9443
Jun 3, 2020 10:16:01 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:9443
Jun 3, 2020 10:16:01 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.BindException) caught when processing request to {}->http://127.0.0.1:9443: Address already in use: connect
Jun 3, 2020 10:16:01 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.BindException) caught when processing request to {}->http://127.0.0.1:9443: Address already in use: connect
Jun 3, 2020 10:16:01 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:9443

다음의 글을 보고 해결함

boneman.tistory.com/entry/Jmeter-%EC%98%A4%EB%A5%98javanetBindException-Address-already-in-use-connect

 

어쨋든 이리저리 알아보다 시간날때 읽어볼 글도 하나 찾음

jojoldu.tistory.com/318

 

1. AWS Beanstalk을 이용한 성능 튜닝 시리즈 - DB Connection Pool

안녕하세요 이번 시간에는 AWS Beanstalk을 이용한 웹 어플리케이션 서버 성능 튜닝 시리즈를 시작합니다. 모든 코드는 Github에 있으니 참고하시면 됩니다. 신규 서비스를 출시할때마다 성능 테스트

jojoldu.tistory.com

 

# Java

시간을 기반으로 한 유니크한 문자열 만드는 방법
https://stackoverflow.com/questions/9191288/creating-a-unique-timestamp-in-java

    private static final AtomicLong LAST_TIME_MS = new AtomicLong();
    private static long uniqueCurrentTimeMS() {
        long now = System.currentTimeMillis();
        while (true) {
            long lastTime = LAST_TIME_MS.get();
            if (lastTime >= now)
                now = lastTime + 1;
            if (LAST_TIME_MS.compareAndSet(lastTime, now))
                return now;
        }
    }

 

소요시간 구하기

https://www.baeldung.com/java-measure-elapsed-time

long start = System.currentTimeMillis();

// ... code

long finish = System.currentTimeMillis();
long timeElapsed = finish - start;

 

# MySql

시간 차이 구하는 SQL

https://stackoverflow.com/questions/10907750/calculate-difference-between-two-datetimes-in-mysql

SELECT TIMESTAMPDIFF(SECOND, '2020-06-02 14:11:20', '2020-06-01 16:10:25')

 

 

+ Recent posts