Remove benchmark test of a single assignment

EndpointRender was so trivial it took a long time to hunt for a number
of iterations that took over 1 second.  So stop benchmarking it, and
indeed get rid of it completely.
This commit is contained in:
Bryan Boreham
2020-03-10 11:12:45 +00:00
parent e6eaf11fb6
commit 09e15d7f70
3 changed files with 2 additions and 6 deletions

View File

@@ -18,8 +18,7 @@ var (
benchmarkRenderResult render.Nodes
)
func BenchmarkEndpointRender(b *testing.B) { benchmarkRender(b, render.EndpointRenderer) }
func BenchmarkProcessRender(b *testing.B) { benchmarkRender(b, render.ProcessRenderer) }
func BenchmarkProcessRender(b *testing.B) { benchmarkRender(b, render.ProcessRenderer) }
func BenchmarkConnectedProcessRender(b *testing.B) {
benchmarkRender(b, render.ConnectedProcessRenderer)
}

View File

@@ -12,9 +12,6 @@ import (
// and "unmanaged containers".
const Pseudo = "pseudo"
// EndpointRenderer is a Renderer which produces a renderable endpoint graph.
var EndpointRenderer = SelectEndpoint
type endpointMapFunc func(report.Node) string
type mapEndpoints struct {

View File

@@ -13,7 +13,7 @@ import (
)
func TestEndpointRenderer(t *testing.T) {
have := utils.Prune(render.EndpointRenderer.Render(context.Background(), fixture.Report).Nodes)
have := utils.Prune(render.SelectEndpoint.Render(context.Background(), fixture.Report).Nodes)
want := utils.Prune(expected.RenderedEndpoints)
if !reflect.DeepEqual(want, have) {
t.Error(test.Diff(want, have))