@Test public void providesBackendRequestData() { metricRegistry.meter("origins.app.requests.success-rate").mark(123); metricRegistry.meter("origins.app.requests.error-rate").mark(111); metricRegistry.timer("origins.app.requests.latency").update(1000, MILLISECONDS); metricRegistry.timer("origins.app.requests.time-to-first-byte").update(500, MILLISECONDS); DashboardData.Requests requests = newDashboardData().downstream().firstBackend().requests(); assertThat(requests.successRate().count(), is(123L)); assertThat(requests.errorRate().count(), is(111L)); assertThat(requests.latency().p50(), is(closeTo(1000.0, 5))); assertThat(requests.timeToFirstByte().p50(), is(closeTo(500.0, 5))); }
@JsonProperty("downstream") public Downstream downstream() { return downstream; }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } DashboardData(MetricRegistry metrics, Registry<BackendService> backendServicesRegistry, String serverId, Version version, EventBus eventBus); }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } DashboardData(MetricRegistry metrics, Registry<BackendService> backendServicesRegistry, String serverId, Version version, EventBus eventBus); @JsonProperty("server") Server server(); @JsonProperty("downstream") Downstream downstream(); @JsonProperty("publishTime") long publishTime(); }
DashboardData { @JsonProperty("downstream") public Downstream downstream() { return downstream; } DashboardData(MetricRegistry metrics, Registry<BackendService> backendServicesRegistry, String serverId, Version version, EventBus eventBus); @JsonProperty("server") Server server(); @JsonProperty("downstream") Downstream downstream(); @JsonProperty("publishTime") long publishTime();  }