* Helps reduce garbage (MakeMetric() now takes a slice and there's a shorter version MakeSingletonMetric())
* Fixes bug computing Max (Min) in samples since using MakeMetric()
was causing a default Max/Min of zero.
* Simplifies code a bit
Also:
* Remove Gob encoder/decoder
* Stop using custom encoders/decoders for Timestamps (both ugorji and the Golang JSON codecs use nanosecond precision).
* Use idiomatic way to check for existence in metric.LastSample()
Merge() is always returning a copy, so there is no need to Copy()
struct fields first before calling Merge() on them.
This reduces GC pressure (#1010) and helps overall app performance
(#1457).
* Allocate all map entries of the intermadiate representation at once
* Use UnsafeMutableMap to improve performance of LatestMap construction
* Remove gob encoder/decoder
* Customer encoder for latest maps
- Cuts out intermediate type
- Should be backwards compatible with existing reports.
* Make it build cleanly
* Review feedback
Avoids creating O(n) garbage by using a slice with enough capacity to
hold the temporary head-portion of the list accumulated while walking
the list to insert element(s).
Squash of:
* We have to keep all the container hostnames until the end so we can
count how many we've filtered
* Adding tests for ContainerHostnameRenderer and PodServiceRenderer with
filters
* Because we filter on image name we need the image name before
filtering
* Alternative approach to passing decorators.
* Refactor out some of the decorator capture
* Don't memoise decorated calls to Render
* Fixing filtered counts on containers topology
Tricky, because we need the filters to be silent sometimes (when they're
in the middle), but not when they're at the top, so we take the "top"
filter's stats. However, this means we have to compose all
user-specified filters into a single Filter layer, so we can get all
stats.
There are no more Silent filters, as all filters are silent (unless they
are at the top).
Additionally, I clarified some of the filters as their usage/terminology
was inconsistent and confused. Now Filter(IsFoo, ...) *keeps* only nodes
where IsFoo is true.
* Remove individually vendored k8s.io/kubernetes/pkg/<foo>
* Vendor the whole of vendor/k8s.io/kubernetes/pkg
* Add k8s pod log control
* Tag pods with host id and include them in the host topology as children.
* adding a basic test for kubernetes.Reporter.GetLogs
* Show k8s labels and container env vars in the details panel.
* Add show more bar to the env vars and labels
* React key was in the wrong place; empty tables render section labels.