WakeMeUpInTheMiddleOfTheNight log level · divan's blog
On the last Golang Barcelona meetup we decided to try new format of conversation and after the talk started open discussion on logging, tracing and metrics. The idea was to encourage people to read a very nice blog post by Peter Bourgon on this subject - "Metrics, Tracing and Logging" and discuss it in a free format.
golang/dep
Go dependency tool
Proposal: Dense mark bits and sweep-free allocation
This document proposes a change to memory allocation to eliminate the need for the sweeper and a new representation for the mark bitmap that enables this. This reduces the cost of allocation, significantly improves the locality of the mark bitmap, and paves the way for future advances to the Go GC that require multiple mark bits.
I/O With Go: io.Pipe()
package main import ( "encoding/json" "io" "io/ioutil" "log" "net/http" ) type msg struct { Text string } func handleErr(err error) { if err != nil { log.Fatalf("%s\n", err) } } // use a io.Pipe to connect a JSON encoder to an HTTP POST: this way you do // not need
Go: The price of interface{}
Go's empty interface{} is the interface that everything implements. It allows functions that can be passed any type. The function func f(any interface{}) can be called with a string f("a string"), an integer f(42), a custom type, or anything else. This flexibility comes at a cost.
Go Execution Tracer
Dmitry Vyukov, [email protected] Go has a number of profiling tools -- CPU, memory, blocking profilers; GC and scheduler tracers and heap dumper. However, profilers provide only aggregate information, for example, how much memory in total was allocated at this source line. Tracers provide very shallow information.