Search in sources :

Example 6 with Ping

use of com.yahoo.prelude.Ping 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);
}
Also used : Hit(com.yahoo.search.result.Hit) Parameters(com.yahoo.search.statistics.TimingSearcher.Parameters) Execution(com.yahoo.search.searchchain.Execution) Query(com.yahoo.search.Query) Ping(com.yahoo.prelude.Ping) ComponentId(com.yahoo.component.ComponentId) Result(com.yahoo.search.Result)

Aggregations

Ping (com.yahoo.prelude.Ping)6 Execution (com.yahoo.search.searchchain.Execution)6 Query (com.yahoo.search.Query)4 ComponentId (com.yahoo.component.ComponentId)3 Pong (com.yahoo.prelude.Pong)3 Result (com.yahoo.search.Result)3 Hit (com.yahoo.search.result.Hit)3 Parameters (com.yahoo.search.statistics.TimingSearcher.Parameters)3 Test (org.junit.Test)2 Chain (com.yahoo.component.chain.Chain)1 Fs4Config (com.yahoo.container.search.Fs4Config)1 MockBackend (com.yahoo.prelude.fastsearch.test.fs4mock.MockBackend)1 Searcher (com.yahoo.search.Searcher)1