Я пытаюсь отладить некоторые проблемы в сети, и я хотел бы отследить время отклика для различных событий. Например, время, необходимое для подключения к серверу, против времени, которое требуется серверу для отображения страницы (поэтому time wget ...
не будет работать)
Я использовал 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.
Есть ли способ добавить метки времени к различным запросам?
Попробовать ab
от apache2-utils
пакет. это скажет Вам соединение, обрабатывая и времена ожидания:
$ 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
sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run ‘apt-get -f install’ to correct these. The following packages have unmet dependencies. libreoffice-core : Depends: libreoffice-common (> 1:4.4.3~rc2) but it is not installed libreoffice-help-en-us : Depends: libreoffice-l10n-en-us libreoffice-l10n-en-gb : Depends: libreoffice-common but it is not installed libreoffice-l10n-en-za : Depends: libreoffice-common but it is not installed E: Unmet dependencies. Try using -f
– Dave D 27 May 2015 в 02:07