Wget com tempo de resposta

1

Estou tentando depurar alguns problemas de rede e gostaria de rastrear o tempo de resposta para diferentes eventos. Por exemplo, o tempo que leva para se conectar ao servidor versus o tempo que levou para o servidor renderizar a página (portanto, time wget ... não funcionará)

Eu tenho usado o wget

$ wget --spider www.google.com
Spider mode enabled. Check if remote file exists.
--2013-11-22 13:56:10--  http://www.google.com/
Resolving www.google.com... 74.125.224.52, 74.125.224.49, 74.125.224.48, ...
Connecting to www.google.com|74.125.224.52|:80... connected.    <-- Time here
HTTP request sent, awaiting response... 200 OK                  <-- Time here
Length: unspecified [text/html]
Remote file exists and could contain further links,
but recursion is disabled -- not retrieving.

Existe uma maneira de adicionar carimbos de hora às várias solicitações?

    
por Steve Robbins 22.11.2013 / 22:57

1 resposta

5

Teste ab do pacote apache2-utils . ele informará a conexão, o processamento e os tempos de espera:

$ ab  http://www.yahoo.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.yahoo.com (be patient).....done


Server Software:        YTS/1.20.13
Server Hostname:        www.yahoo.com
Server Port:            80

Document Path:          /
Document Length:        82 bytes

Concurrency Level:      1
Time taken for tests:   0.066 seconds
Complete requests:      1
Failed requests:        0
Write errors:           0
Non-2xx responses:      1
Total transferred:      1217 bytes
HTML transferred:       82 bytes
Requests per second:    15.20 [#/sec] (mean)
Time per request:       65.796 [ms] (mean)
Time per request:       65.796 [ms] (mean, across all concurrent requests)
Transfer rate:          18.06 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        1    1   0.0      1       1
Processing:    65   65   0.0     65      65
Waiting:       62   62   0.0     62      62
Total:         66   66   0.0     66      66
    
por roadmr 22.11.2013 / 23:07