()
| 908 | } |
| 909 | |
| 910 | func (t *Timer) String() string { |
| 911 | sort.Slice(t.records, func(i, j int) bool { |
| 912 | return t.records[i].Dur > t.records[j].Dur |
| 913 | }) |
| 914 | return fmt.Sprintf("Timer Total: %s. Breakdown: %v", t.Total(), t.records) |
| 915 | } |
| 916 | |
| 917 | // PredicateLang extracts the language from a predicate (or facet) name. |
| 918 | // Returns the predicate and the language tag, if any. |