Skip to content
This repository was archived by the owner on May 31, 2020. It is now read-only.

Latest commit

 

History

History

ab

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

AB

Usage

  • cd server && go run main.go to start a http server on localhost:8000, everything is hard coded, https code is commented out.
  • cd ab && go run main.go to make request to localhost:8000, everything is hard coded right now

Key points

  • go lang currency
  • net/http/httptrace
  • aggregate data

TODO

NOTE

  • need to change the file descriptor. ulimit -n show current one ulimit -n 4096 to set limit in current shell.
  • the max file descriptor can be found using cat /proc/sys/fs/file-max
  • invalid memory address or nil pointer dereference, response can be nil when err is not nil
  • need to call res.Body.Close() so both server and client and release resource to avoid file descriptor running out.
  • MUST make shallow copy of request, otherwise res.Body.Close() would cause all the reuqest being cancelled
  • connect: cannot assign requested address golang/go#16012 seems need to set maxidle connection per host run ab/ab/main serveral times and this problem will appear

Ref