Recent Posts
                                        
                                    
                                    
                                        Recent Comments
                                        
                                    
                                    
                                        Link
                                        
                                    
                                | 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 | 
| 12 | 13 | 14 | 15 | 16 | 17 | 18 | 
| 19 | 20 | 21 | 22 | 23 | 24 | 25 | 
| 26 | 27 | 28 | 29 | 30 | 31 | 
                                        Tags
                                        
                                    
                                    - leetcode
- 알고리즘
- programmers
- Java
- 프로그래머스
- Go언어
- Python
- zookeeper
- OOM
- redis
- golang
- 자바
- dynamic programming
- gradle
- 파이썬
- docker
- 주키퍼
- HBase
- Linux
- 스칼라
- DP
- 튜토리얼
- 리눅스
- go
- 문제풀이
- codewars
- 코드워
- boj
- scala
- 동적프로그래밍
                                        Archives
                                        
                                    
                                    - Today
- Total
파이문
curl 요청 및 응답 시간 자세히 보기 본문
728x90
    
    
  curl 로 특정 URL 을 요청할 일이 있어서 해보다가 request, response 시간을 자세히 측정할 수는 없는걸까? 하다가 찾아보았다.
1. curl-format.txt 란 파일을 생성하고 아래의 내용을 입력한다.
    time_namelookup:  %{time_namelookup}s\n
       time_connect:  %{time_connect}s\n
    time_appconnect:  %{time_appconnect}s\n
   time_pretransfer:  %{time_pretransfer}s\n
      time_redirect:  %{time_redirect}s\n
 time_starttransfer:  %{time_starttransfer}s\n
                    ----------\n
         time_total:  %{time_total}s\n2. curl 을 사용할 때 아래 처럼 쓴다.
curl -w "@curl-format.txt" -o /dev/null -s "주소 입력"3. 그러면 아래 처럼 cli 에서 보여진다.
    time_namelookup:  0.004151s
       time_connect:  0.005090s
    time_appconnect:  0.018481s
   time_pretransfer:  0.018504s
      time_redirect:  0.000000s
 time_starttransfer:  0.019474s
                    ----------
         time_total:  0.019502s참고
stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl
'TIL' 카테고리의 다른 글
| gradle proxy 설정 (0) | 2021.02.17 | 
|---|---|
| git rm 한 file 복구(reset, restore) 하기 (0) | 2021.02.16 | 
| TimedSemaphore 를 사용하던 멀티 쓰레드가 종료 안되던 문제 (0) | 2020.12.08 | 
| Producer-Consumer 종료하기 (0) | 2020.12.03 | 
| [Hadoop] TableReducer 로 테이블 여러개 사용하기 (0) | 2020.11.20 | 
                          Comments
                        
                    
                
            
                
            
				
				
				
				
                
            