/** * Set the max serve time in ns, above which serves are considered slow * @param maxAvgServeTimeNanoSeconds max serve time, in ns * @return a reference to this, so the API can be used fluently */ public io.vertx.rxjava.ext.web.handler.StaticHandler setMaxAvgServeTimeNs(long maxAvgServeTimeNanoSeconds) { delegate.setMaxAvgServeTimeNs(maxAvgServeTimeNanoSeconds); return this; }
/** * Set the max serve time in ns, above which serves are considered slow * @param maxAvgServeTimeNanoSeconds max serve time, in ns * @return a reference to this, so the API can be used fluently */ public io.vertx.rxjava.ext.web.handler.StaticHandler setMaxAvgServeTimeNs(long maxAvgServeTimeNanoSeconds) { delegate.setMaxAvgServeTimeNs(maxAvgServeTimeNanoSeconds); return this; }
@Test public void testFSBlockingTuning() throws Exception { stat.setCachingEnabled(false); stat.setMaxAvgServeTimeNs(10000); for (int i = 0; i < 2000; i++) { testRequest(HttpMethod.GET, "/otherpage.html", null, res -> { String cacheControl = res.headers().get("cache-control"); String lastModified = res.headers().get("last-modified"); assertNull(cacheControl); assertNull(lastModified); }, 200, "OK", "<html><body>Other page</body></html>"); } }
@Test public void testFSBlockingTuning() throws Exception { stat.setCachingEnabled(false); stat.setMaxAvgServeTimeNs(10000); for (int i = 0; i < 2000; i++) { testRequest(HttpMethod.GET, "/otherpage.html", null, res -> { String cacheControl = res.headers().get("cache-control"); String lastModified = res.headers().get("last-modified"); assertNull(cacheControl); assertNull(lastModified); }, 200, "OK", "<html><body>Other page</body></html>"); } }