mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
* Pass Go context down to Renderers This is useful for cancellation or tracing. * Add tracing spans to app Also log things like number of nodes in Map, total number of reports.
18 lines
311 B
Go
18 lines
311 B
Go
package render
|
|
|
|
import (
|
|
"reflect"
|
|
"runtime"
|
|
)
|
|
|
|
func functionName(i interface{}) string {
|
|
return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
|
|
}
|
|
|
|
func typeName(i interface{}) string {
|
|
if m, ok := i.(*memoise); ok {
|
|
return "memoise:" + typeName(m.Renderer)
|
|
}
|
|
return reflect.TypeOf(i).String()
|
|
}
|