(span Span, spanStartTime uint64)
| 96 | } |
| 97 | |
| 98 | func (m *MetricsCompare) isSelection(span Span, spanStartTime uint64) Static { |
| 99 | // Determine if this span is inside the selection |
| 100 | isSelection := StaticFalse |
| 101 | if m.start > 0 && m.end > 0 { |
| 102 | // Timestamp filtering |
| 103 | if spanStartTime > uint64(m.start) && spanStartTime <= uint64(m.end) { |
| 104 | isSelection, _ = m.f.Expression.execute(span) |
| 105 | } |
| 106 | } else { |
| 107 | // No timestamp filtering |
| 108 | isSelection, _ = m.f.Expression.execute(span) |
| 109 | } |
| 110 | return isSelection |
| 111 | } |
| 112 | |
| 113 | func (m *MetricsCompare) observe(span Span) { |
| 114 | // For performance, MetricsCompare doesn't use the Range/StepAggregator abstractions. |
no test coverage detected