public class DefaultSearchQueryMetrics extends Object implements SearchQueryMetrics
QueryMetrics
javadoc.Constructor and Description |
---|
DefaultSearchQueryMetrics(QueryMetrics<Query<?>> queryMetrics) |
Modifier and Type | Method and Description |
---|---|
void |
chunkInterval(org.joda.time.Interval interval) |
void |
context(SearchQuery query)
Sets
Query.getContext() of the given query as dimension. |
void |
dataSource(SearchQuery query)
Sets
Query.getDataSource() of the given query as dimension. |
void |
duration(SearchQuery query)
Sets
Query.getDuration() of the given query as dimension. |
void |
emit(ServiceEmitter emitter)
Emits all metrics, registered since the last
emit() call on this QueryMetrics object. |
void |
granularity(SearchQuery query)
Sets the granularity of
BaseQuery.getGranularity() of the given query as dimension. |
void |
hasFilters(SearchQuery query)
Sets
Query.hasFilters() of the given query as dimension. |
void |
identity(String identity)
Sets identity of the requester for a query.
|
void |
interval(SearchQuery query)
Sets
Query.getIntervals() of the given query as dimension. |
BitmapResultFactory<?> |
makeBitmapResultFactory(BitmapFactory factory)
Creates a
BitmapResultFactory which may record some information along bitmap construction from QueryMetrics.preFilters(List) . |
void |
postFilters(List<Filter> postFilters) |
void |
preFilters(List<Filter> preFilters) |
void |
query(SearchQuery query)
Pulls all information from the query object into dimensions of future metrics.
|
void |
queryId(SearchQuery query)
Sets
Query.getId() of the given query as dimension. |
void |
queryType(SearchQuery query)
Sets
Query.getType() of the given query as dimension. |
void |
remoteAddress(String remoteAddress) |
QueryMetrics |
reportBitmapConstructionTime(long timeNs)
Reports the time spent constructing bitmap from
QueryMetrics.preFilters(List) of the query. |
QueryMetrics |
reportCpuTime(long timeNs)
Registers "cpu time" metric.
|
QueryMetrics |
reportIntervalChunkTime(long timeNs)
Registers "interval chunk time" metric.
|
QueryMetrics |
reportNodeBytes(long byteCount)
Registers "node bytes" metric.
|
QueryMetrics |
reportNodeTime(long timeNs)
Registers "node time" metric.
|
QueryMetrics |
reportNodeTimeToFirstByte(long timeNs)
Registers "time to first byte" metric.
|
QueryMetrics |
reportPreFilteredRows(long numRows)
Reports the number of rows to scan in the segment after applying
QueryMetrics.preFilters(List) . |
QueryMetrics |
reportQueryBytes(long byteCount)
Registers "query bytes" metric.
|
QueryMetrics |
reportQueryTime(long timeNs)
Registers "query time" metric.
|
QueryMetrics |
reportSegmentAndCacheTime(long timeNs)
Registers "segmentAndCache time" metric.
|
QueryMetrics |
reportSegmentRows(long numRows)
Reports the total number of rows in the processed segment.
|
QueryMetrics |
reportSegmentTime(long timeNs)
Registers "segment time" metric.
|
QueryMetrics |
reportWaitTime(long timeNs)
Registers "wait time" metric.
|
void |
segment(String segmentIdentifier) |
void |
server(String host) |
void |
status(String status) |
void |
success(boolean success) |
public DefaultSearchQueryMetrics(QueryMetrics<Query<?>> queryMetrics)
public void query(SearchQuery query)
QueryMetrics
query
in interface QueryMetrics<SearchQuery>
public void dataSource(SearchQuery query)
QueryMetrics
Query.getDataSource()
of the given query as dimension.dataSource
in interface QueryMetrics<SearchQuery>
public void queryType(SearchQuery query)
QueryMetrics
Query.getType()
of the given query as dimension.queryType
in interface QueryMetrics<SearchQuery>
public void interval(SearchQuery query)
QueryMetrics
Query.getIntervals()
of the given query as dimension.interval
in interface QueryMetrics<SearchQuery>
public void hasFilters(SearchQuery query)
QueryMetrics
Query.hasFilters()
of the given query as dimension.hasFilters
in interface QueryMetrics<SearchQuery>
public void duration(SearchQuery query)
QueryMetrics
Query.getDuration()
of the given query as dimension.duration
in interface QueryMetrics<SearchQuery>
public void queryId(SearchQuery query)
QueryMetrics
Query.getId()
of the given query as dimension.queryId
in interface QueryMetrics<SearchQuery>
public void granularity(SearchQuery query)
SearchQueryMetrics
BaseQuery.getGranularity()
of the given query as dimension.
This method is going to be used in "full" metrics impl,
see https://github.com/druid-io/druid/pull/4570#issuecomment-319458229granularity
in interface SearchQueryMetrics
public void context(SearchQuery query)
QueryMetrics
Query.getContext()
of the given query as dimension.context
in interface QueryMetrics<SearchQuery>
public void server(String host)
server
in interface QueryMetrics<SearchQuery>
public void remoteAddress(String remoteAddress)
remoteAddress
in interface QueryMetrics<SearchQuery>
public void status(String status)
status
in interface QueryMetrics<SearchQuery>
public void success(boolean success)
success
in interface QueryMetrics<SearchQuery>
public void segment(String segmentIdentifier)
segment
in interface QueryMetrics<SearchQuery>
public void chunkInterval(org.joda.time.Interval interval)
chunkInterval
in interface QueryMetrics<SearchQuery>
public void preFilters(List<Filter> preFilters)
preFilters
in interface QueryMetrics<SearchQuery>
public void postFilters(List<Filter> postFilters)
postFilters
in interface QueryMetrics<SearchQuery>
public void identity(String identity)
QueryMetrics
AuthenticationResult
.identity
in interface QueryMetrics<SearchQuery>
public BitmapResultFactory<?> makeBitmapResultFactory(BitmapFactory factory)
QueryMetrics
BitmapResultFactory
which may record some information along bitmap construction from QueryMetrics.preFilters(List)
. The returned BitmapResultFactory may add some dimensions to this QueryMetrics from it's BitmapResultFactory.toImmutableBitmap(Object)
method. See BitmapResultFactory
Javadoc for more
information.makeBitmapResultFactory
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportQueryTime(long timeNs)
QueryMetrics
reportQueryTime
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportQueryBytes(long byteCount)
QueryMetrics
reportQueryBytes
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportWaitTime(long timeNs)
QueryMetrics
reportWaitTime
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportSegmentTime(long timeNs)
QueryMetrics
reportSegmentTime
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportSegmentAndCacheTime(long timeNs)
QueryMetrics
reportSegmentAndCacheTime
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportIntervalChunkTime(long timeNs)
QueryMetrics
reportIntervalChunkTime
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportCpuTime(long timeNs)
QueryMetrics
reportCpuTime
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportNodeTimeToFirstByte(long timeNs)
QueryMetrics
reportNodeTimeToFirstByte
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportNodeTime(long timeNs)
QueryMetrics
reportNodeTime
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportNodeBytes(long byteCount)
QueryMetrics
reportNodeBytes
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportBitmapConstructionTime(long timeNs)
QueryMetrics
QueryMetrics.preFilters(List)
of the query. Not reported, if there are
no preFilters.reportBitmapConstructionTime
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportSegmentRows(long numRows)
QueryMetrics
reportSegmentRows
in interface QueryMetrics<SearchQuery>
public QueryMetrics reportPreFilteredRows(long numRows)
QueryMetrics
QueryMetrics.preFilters(List)
. If the are no
preFilters, this metric is equal to QueryMetrics.reportSegmentRows(long)
.reportPreFilteredRows
in interface QueryMetrics<SearchQuery>
public void emit(ServiceEmitter emitter)
QueryMetrics
emit()
call on this QueryMetrics object.emit
in interface QueryMetrics<SearchQuery>
Copyright © 2011–2018. All rights reserved.