writev/

directory
v0.0.0-...-f53f79a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2019 License: MIT

README

go-writev

The prototype program for golang-writev.

Usage

This program use a tcp server and client to profile the writev, the arch is:

+--------+             +---------+
| client +----tcp------+ server  +
+--------+             +---------+

To use private TCPConn.Writev from winlin:

mkdir -p $GOPATH/src/github.com/winlinvip && cd $GOPATH/src/github.com/winlinvip &&
if [[ ! -d go/src ]]; then echo "get writev go."; git clone https://github.com/winlinvip/go; fi &&
cd go && git checkout go1.5-writev && cd $GOROOT/src && sudo mv net net.`date +%s` && 
sudo ln -sf $GOPATH/src/github.com/winlinvip/go/src/net

To start the tcp server, use write to send tcp packets:

go get -d github.com/winlinvip/go-writev/tcpserver && 
cd $GOPATH/src/github.com/winlinvip/go-writev/tcpserver && go build -a . &&
./tcpserver --port=1985 --writev=false

Or use writev to send:

go get -d github.com/winlinvip/go-writev/tcpserver && 
cd $GOPATH/src/github.com/winlinvip/go-writev/tcpserver && go build -a . &&
./tcpserver --port=1985 --writev=true

Then, please start the client to recv tcp packets:

go get github.com/winlinvip/go-writev/tcpclient && 
$GOPATH/bin/tcpclient --port=1985

Remarks:

  1. Profile: Both server and client will write cpu(cpu.prof) and memory(mem.prof) profile, user can use go tool pprof $GOPATH/bin/tcpserver cpu.prof to profile it.
  2. GO sdk: Please use go1.5 and private implementation for writev.
  3. Fast build: User can rebuild the golang sdk for this program by cd $GOPATH/src/github.com/winlinvip/go-writev/tcpserver && go build -a .

Benchmark

Coming soon...

Conclude

Coming soon...

Winlin 2015

Directories

Path Synopsis
the prototype for go-writev, https://github.com/golang/go/issues/13451
the prototype for go-writev, https://github.com/golang/go/issues/13451
the prototype for go-writev, https://github.com/golang/go/issues/13451
the prototype for go-writev, https://github.com/golang/go/issues/13451

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL