2, 'area_id' => 32]; $client = new Client(); $commandBus = new CommandBus($client); $queryService = new QueryService($client); $commandBus->dispatch(C::delete(SERIES)); $commandBus->dispatch(C::create(SERIES)->labels(LABELS)); $timeseries = new Timeseries($commandBus, SERIES); $timeseries->add( new Value(time() - 5, 3.2), new Value(time() - 4, 7.8), new Value(time() - 3, 2.3), new Value(time() - 2, 3.4), new Value(time() - 1, 5.4), new Value(time() - 0, 6.4) ); print("\n\n==> mrange (filter on area_id=32, sensor_id=(2,3,4,5), COUNT 2)\n"); $query = Q::mrange(); $query->filter(Filter::where('area_id')->is(32)); $query->filter(Filter::where('sensor_id')->isOneOf(2, 3, 4, 5)); dump($queryService->mrange($query)); print("\n\n==> mrevrange (filter on non-existing label)\n"); $query = Q::mrevrange(); $query->filter(Filter::where('some_label')->is('some_value')); dump($queryService->mrange($query)); print("\n\n==> range (aggregating var_p, timebucket=3)\n"); $query = Q::range(SERIES)->aggregate(Aggregation::populationVariance(3)); dump($queryService->range($query));