use of com.yahoo.search.statistics.TimingSearcher.Parameters in project vespa by vespa-engine.
the class TimingSearcherTestCase method testMeasurementPingPath.
public void testMeasurementPingPath() {
Parameters p = new Parameters("timingtest", TimeTracker.Activity.PING);
TimingSearcher ts = new TimingSearcher(new ComponentId("lblblbl"), p, Statistics.nullImplementation);
MockValue v = new MockValue();
ts.setMeasurements(v);
Execution exec = new Execution(ts, Execution.Context.createContextStub());
Result r = exec.search(new Query("/?query=a"));
Hit f = new Hit("blblbl");
f.setFillable();
r.hits().add(f);
exec.fill(r, "whatever");
exec.fill(r, "lalala");
exec.ping(new Ping());
exec.ping(new Ping());
exec.ping(new Ping());
assertEquals(3, v.putCount);
}
use of com.yahoo.search.statistics.TimingSearcher.Parameters in project vespa by vespa-engine.
the class TimingSearcherTestCase method testMeasurementSearchPath.
public void testMeasurementSearchPath() {
Parameters p = new Parameters("timingtest", TimeTracker.Activity.SEARCH);
TimingSearcher ts = new TimingSearcher(new ComponentId("lblblbl"), p, Statistics.nullImplementation);
MockValue v = new MockValue();
ts.setMeasurements(v);
Execution exec = new Execution(ts, Execution.Context.createContextStub());
Result r = exec.search(new Query("/?query=a"));
Hit f = new Hit("blblbl");
f.setFillable();
r.hits().add(f);
exec.fill(r, "whatever");
exec.fill(r, "lalala");
exec.ping(new Ping());
exec.ping(new Ping());
exec.ping(new Ping());
assertEquals(1, v.putCount);
}
use of com.yahoo.search.statistics.TimingSearcher.Parameters in project vespa by vespa-engine.
the class TimingSearcherTestCase method testMeasurementFillPath.
public void testMeasurementFillPath() {
Parameters p = new Parameters("timingtest", TimeTracker.Activity.FILL);
TimingSearcher ts = new TimingSearcher(new ComponentId("lblblbl"), p, Statistics.nullImplementation);
MockValue v = new MockValue();
ts.setMeasurements(v);
Execution exec = new Execution(ts, Execution.Context.createContextStub());
Result r = exec.search(new Query("/?query=a"));
Hit f = new Hit("blblbl");
f.setFillable();
r.hits().add(f);
exec.fill(r, "whatever");
exec.fill(r, "lalala");
exec.ping(new Ping());
exec.ping(new Ping());
exec.ping(new Ping());
assertEquals(2, v.putCount);
}
Aggregations