latency

Measure network round-trip latency by sending a TCP SYN packet.

  • 所有者: grahamking/latency
  • 平台:
  • 許可證: GNU General Public License v3.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Install: go get github.com/grahamking/latency

Run: sudo latency [hostname].

Example output:

$ sudo ./latency github.com

Measuring round-trip latency from 192.168.1.26 to 192.30.252.131 on port 80

Latency: 116.601914ms

The sudo is needed to open a raw socket. If you know how to do this with capabilities, please do tell.

latency can also run in auto mode, where it tests a range of well known sites (which will be geo-balanced), and some servers in specific locations. It's fun, try it! sudo latency -a

latency sends a TCP SYN packet (the opening of the three-way handshake) to a remote host on port 80. That host will respond with either a RST (if the port is closed), or a SYN/ACK (if the port is open). Either way, we time how long it takes between sending the SYN and receiving the response. That's your network latency.

There are of course many other ways to measure this (mtr is nice), but this is a fun exercise in using raw sockets and binary encoding in Go.

License: GPL.

主要指標

概覽
名稱與所有者grahamking/latency
主編程語言Go
編程語言Go (語言數: 1)
平台
許可證GNU General Public License v3.0
所有者活动
創建於2014-01-01 20:08:55
推送於2016-03-30 16:50:50
最后一次提交2016-03-30 09:50:49
發布數0
用户参与
星數191
關注者數2
派生數37
提交數15
已啟用問題?
問題數2
打開的問題數2
拉請求數4
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?