removed logging
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Jake Hillion 2021-03-23 19:36:51 +00:00
parent 69eb4d4810
commit a98e9e7902

View File

@ -5,7 +5,6 @@ import (
"encoding/binary"
"fmt"
"io"
"log"
"mpbl3p/proxy"
"mpbl3p/shared"
"net"
@ -188,9 +187,7 @@ func (f *Flow) Produce(v proxy.MacVerifier) (proxy.Packet, error) {
func (f *Flow) consumeMarshalled() {
for {
t1 := time.Now()
data := <-f.toConsume
t2 := time.Now()
err := f.conn.SetWriteDeadline(time.Now().Add(5 * time.Second))
if err != nil {
@ -202,9 +199,6 @@ func (f *Flow) consumeMarshalled() {
f.consumeErrors <- err
return
}
t3 := time.Now()
log.Printf("consumer: `%dns` spent waiting, `%dns` spent consuming", t2.Sub(t1).Nanoseconds(), t3.Sub(t2).Nanoseconds())
}
}
@ -212,7 +206,6 @@ func (f *Flow) produceMarshalled() {
buf := bufio.NewReader(f.conn)
for {
t1 := time.Now()
lengthBytes := make([]byte, 4)
if n, err := io.LimitReader(buf, 4).Read(lengthBytes); err != nil {
f.produceErrors <- err
@ -235,10 +228,6 @@ func (f *Flow) produceMarshalled() {
}
}
t2 := time.Now()
f.produced <- dataBytes
t3 := time.Now()
log.Printf("producer: `%dns` spent producing, `%dns` spent waiting", t2.Sub(t1).Nanoseconds(), t3.Sub(t2).Nanoseconds())
}
}