func NewWeightedTrace(trace pb.Trace, root *pb.Span) WeightedTrace {
	wt := make(WeightedTrace, len(trace))

	weight := Weight(root)

	for i := range trace {
		wt[i] = &WeightedSpan{
			Span:     trace[i],
			Weight:   weight,
			TopLevel: traceutil.HasTopLevel(trace[i]),
			Measured: traceutil.IsMeasured(trace[i]),
		}
	}
	return wt
}
// NewWeightedTrace returns a weighted trace, with coefficient required by the concentrator.
NewWeightedTrace returns a weighted trace, with coefficient required by the concentrator.
// NewWeightedTrace returns a weighted trace with coefficient required by the concentrator .
func NewWeightedTrace(trace pb.Trace, root *pb.Span) WeightedTrace {
	wt := make(WeightedTrace, len(trace))
	weight := Weight(root)
	for i := range trace {
		wt[i] = &WeightedSpan{
			Span:     trace[i],
			Weight:   weight,
			TopLevel: traceutil.HasTopLevel(trace[i]),
			Measured: traceutil.IsMeasured(trace[i]),
		}
	}
	return wt
}
func NewWeightedTrace ( trace pb . Trace , root * pb . Span ) WeightedTrace { wt := make ( WeightedTrace , len ( trace ) ) weight := Weight ( root ) for i := range trace { wt [ i ] = & WeightedSpan { Span : trace [ i ] , Weight : weight , TopLevel : traceutil . HasTopLevel ( trace [ i ] ) , Measured : traceutil . IsMeasured ( trace [ i ] ) , } } return wt }
NewWeightedTrace returns a weighted trace, with coefficient required by the concentrator.
NewWeightedTrace returns a weighted trace with coefficient required by the concentrator .