上一页 1 2 3 4 5 6 ··· 21 下一页
摘要: cat demo.pcap.txz | xz -d -T 5 > demo.pcap 阅读全文
posted @ 2023-04-19 16:05 ☞@_@ 阅读(56) 评论(0) 推荐(0) 编辑
摘要: //捕获服务器流量到本地 sudo ./gor --input-raw :8082 --output-file=requests.gor //从本地文件回放流量 ./gor --input-file requests_0.gor --output-http="http://172.16.106.23 阅读全文
posted @ 2023-04-19 09:58 ☞@_@ 阅读(40) 评论(0) 推荐(0) 编辑
摘要: tcpdump -i any port 1280 -s 0 -w test.pcap //抓包知道端口的流量 --将包分离成客户端服务器回放的命令 tcpprep -a client -i test.pcap -o test.cache //对报文的通信流量的两方(服务器/ 客户端)进行分离 tcp 阅读全文
posted @ 2023-04-19 09:45 ☞@_@ 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 一、TCP fast open 原理简介: 三次握手带来的延迟使得每创建一个新TCP连接都要付出很大代价。而这也决定了提高TCP应用性能的关键,在于想办法重用连接。 TFO(TCP fast open)允许服务器和客户端在连接建立握手阶段交换数据,从而使应用节省了一个RTT的时延。 但是TFO会引起 阅读全文
posted @ 2023-04-14 18:44 ☞@_@ 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 1、文本类 cat cat -n textfile1 > textfile2 # 把 textfile1 的文档内容加上行号后输入 textfile2 这个文档里 cat -b textfile1 textfile2 >> textfile3 # 把 textfile1 和 textfile2 的文 阅读全文
posted @ 2023-03-31 17:43 ☞@_@ 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 1、configor 参考:configor配置文件工具 - ☞@_@ - 博客园 (cnblogs.com) 2、viper 参考:Go 读取 YAML 配置文件的两种方式 - 掘金 (juejin.cn) 阅读全文
posted @ 2023-02-28 11:15 ☞@_@ 阅读(50) 评论(0) 推荐(0) 编辑
摘要: func upload(w http.ResponseWriter, r *http.Request) { fmt.Println("method:", r.Method) // 获取请求的方法 if r.Method == "GET" { crutime := time.Now().Unix() 阅读全文
posted @ 2023-02-21 14:58 ☞@_@ 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 1、trace可以解决哪些问题 Goroutine 在执行时会做哪些操作? 执行/阻塞了多长时间? 在什么时候阻止? 在哪里被阻止的? 谁又锁/解锁了它们? GC 是怎么影响到 Goroutine 的执行的? 2、代码实例 package main import ( "os" "runtime/tr 阅读全文
posted @ 2023-02-17 15:20 ☞@_@ 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 1、代码实例 以下例子除了特别说明,都以这段代码为实例。 package main import ( "log" "time" "net/http" _ "net/http/pprof" ) var datas []string func main() { go func() { for { log 阅读全文
posted @ 2023-02-17 11:57 ☞@_@ 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1、方法总结 sort.Ints sort.Floats sort.Strings sort.SliceStable sort.Interface{} 2、实例 //sort.Ints() s := []int{4, 2, 3, 1} sort.Ints(s) fmt.Println(s) // 输 阅读全文
posted @ 2023-02-13 14:34 ☞@_@ 阅读(15) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 21 下一页