(t *testing.T)
| 644 | } |
| 645 | |
| 646 | func TestProcessTimersUpperPercentilePostfix(t *testing.T) { |
| 647 | flag.Set("postfix", ".test") |
| 648 | // Some data with expected 75% of 2 |
| 649 | timers = make(map[string]Float64Slice) |
| 650 | timers["postfix_response_time.test"] = []float64{0, 1, 2, 3} |
| 651 | |
| 652 | now := int64(1418052649) |
| 653 | |
| 654 | var buffer bytes.Buffer |
| 655 | num := processTimers(&buffer, now, Percentiles{ |
| 656 | &Percentile{ |
| 657 | 75, |
| 658 | "75", |
| 659 | }, |
| 660 | }) |
| 661 | |
| 662 | lines := bytes.Split(buffer.Bytes(), []byte("\n")) |
| 663 | |
| 664 | assert.Equal(t, num, int64(1)) |
| 665 | assert.Equal(t, string(lines[0]), "postfix_response_time.upper_75.test 2 1418052649") |
| 666 | flag.Set("postfix", "") |
| 667 | } |
| 668 | |
| 669 | func TestProcessTimesLowerPercentile(t *testing.T) { |
| 670 | timers = make(map[string]Float64Slice) |
nothing calls this directly
no test coverage detected