public class

SearchStats.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.localstorage.stats.SearchStats.Builder

Overview

Builder for SearchStats

Summary

Constructors
publicBuilder(int visibilityScope, java.lang.String packageName)

Constructor

Methods
public SearchStatsbuild()

Constructs a new SearchStats from the contents of this SearchStats.Builder.

public SearchStats.BuildersetAclCheckLatencyMillis(int aclCheckLatencyMillis)

Sets time spent on ACL checking, which is the time spent filtering namespaces based on package permissions and Android permission access.

public SearchStats.BuildersetCurrentPageReturnedResultCount(int currentPageReturnedResultCount)

Sets the actual number of results returned in the current page.

public SearchStats.BuildersetDatabase(java.lang.String database)

Sets the database used by the session.

public SearchStats.BuildersetDocumentRetrievingLatencyMillis(int documentRetrievingLatencyMillis)

Sets time used to fetch the document protos.

public SearchStats.BuildersetFilteredNamespaceCount(int filteredNamespaceCount)

Sets number of namespaces filtered.

public SearchStats.BuildersetFilteredSchemaTypeCount(int filteredSchemaTypeCount)

Sets number of schema types filtered.

public SearchStats.BuildersetIsFirstPage(boolean nativeIsFirstPage)

Sets whether the function call is querying the first page.

public SearchStats.BuildersetJavaLockAcquisitionLatencyMillis(int javaLockAcquisitionLatencyMillis)

Sets time passed while waiting to acquire the lock during Java function calls.

public SearchStats.BuildersetJavaToNativeJniLatencyMillis(int javaToNativeJniLatencyMillis)

Sets time used to send data across the JNI boundary from java to native side.

public SearchStats.BuildersetJoinType(int joinType)

Sets whether or not this is a join query

public SearchStats.BuildersetNativeJoinLatencyMillis(int nativeJoinLatencyMillis)

Sets time it takes to join documents together in icing.

public SearchStats.BuildersetNativeLatencyMillis(int nativeLatencyMillis)

Sets overall time used for the native function calls.

public SearchStats.BuildersetNativeLockAcquisitionLatencyMillis(int nativeLockAcquisitionLatencyMillis)

Sets time passed while waiting to acquire the lock during native function calls.

public SearchStats.BuildersetNativeNumJoinedResultsCurrentPage(int nativeNumJoinedResultsCurrentPage)

Set the total number of joined documents in a page.

public SearchStats.BuildersetNativeToJavaJniLatencyMillis(int nativeToJavaJniLatencyMillis)

Sets time used to send data across the JNI boundary from native to java side.

public SearchStats.BuildersetParseQueryLatencyMillis(int parseQueryLatencyMillis)

Sets time used to parse the query, including 2 parts: tokenizing and transforming tokens into an iterator tree.

public SearchStats.BuildersetQueryLength(int queryLength)

Sets length of the search string.

public SearchStats.BuildersetRankingLatencyMillis(int rankingLatencyMillis)

Sets time used to rank the scored results.

public SearchStats.BuildersetRankingStrategy(int rankingStrategy)

Sets strategy of scoring and ranking.

public SearchStats.BuildersetRequestedPageSize(int requestedPageSize)

Sets the requested number of results in one page.

public SearchStats.BuildersetResultWithSnippetsCount(int resultWithSnippetsCount)

Sets how many snippets are calculated.

public SearchStats.BuildersetRewriteSearchResultLatencyMillis(int rewriteSearchResultLatencyMillis)

Sets time used to rewrite the search results.

public SearchStats.BuildersetRewriteSearchSpecLatencyMillis(int rewriteSearchSpecLatencyMillis)

Sets time used to rewrite the search spec.

public SearchStats.BuildersetScoredDocumentCount(int scoredDocumentCount)

Sets number of documents scored.

public SearchStats.BuildersetScoringLatencyMillis(int scoringLatencyMillis)

Sets time used to score the raw results.

public SearchStats.BuildersetSearchSourceLogTag(java.lang.String searchSourceLogTag)

Sets a tag to indicate the source of this search.

public SearchStats.BuildersetStatusCode(int statusCode)

Sets the status of the search.

public SearchStats.BuildersetTermCount(int termCount)

Sets number of terms in the search string.

public SearchStats.BuildersetTotalLatencyMillis(int totalLatencyMillis)

Sets total latency for the search.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(int visibilityScope, java.lang.String packageName)

Constructor

Parameters:

visibilityScope: scope for the corresponding search.
packageName: name of the calling package.

Methods

public SearchStats.Builder setDatabase(java.lang.String database)

Sets the database used by the session.

public SearchStats.Builder setStatusCode(int statusCode)

Sets the status of the search.

public SearchStats.Builder setTotalLatencyMillis(int totalLatencyMillis)

Sets total latency for the search.

public SearchStats.Builder setRewriteSearchSpecLatencyMillis(int rewriteSearchSpecLatencyMillis)

Sets time used to rewrite the search spec.

public SearchStats.Builder setRewriteSearchResultLatencyMillis(int rewriteSearchResultLatencyMillis)

Sets time used to rewrite the search results.

public SearchStats.Builder setJavaLockAcquisitionLatencyMillis(int javaLockAcquisitionLatencyMillis)

Sets time passed while waiting to acquire the lock during Java function calls.

public SearchStats.Builder setAclCheckLatencyMillis(int aclCheckLatencyMillis)

Sets time spent on ACL checking, which is the time spent filtering namespaces based on package permissions and Android permission access.

public SearchStats.Builder setNativeLatencyMillis(int nativeLatencyMillis)

Sets overall time used for the native function calls.

public SearchStats.Builder setTermCount(int termCount)

Sets number of terms in the search string.

public SearchStats.Builder setQueryLength(int queryLength)

Sets length of the search string.

public SearchStats.Builder setFilteredNamespaceCount(int filteredNamespaceCount)

Sets number of namespaces filtered.

public SearchStats.Builder setFilteredSchemaTypeCount(int filteredSchemaTypeCount)

Sets number of schema types filtered.

public SearchStats.Builder setRequestedPageSize(int requestedPageSize)

Sets the requested number of results in one page.

public SearchStats.Builder setCurrentPageReturnedResultCount(int currentPageReturnedResultCount)

Sets the actual number of results returned in the current page.

public SearchStats.Builder setIsFirstPage(boolean nativeIsFirstPage)

Sets whether the function call is querying the first page. If it's not, Icing will fetch the results from cache so that some steps may be skipped.

public SearchStats.Builder setParseQueryLatencyMillis(int parseQueryLatencyMillis)

Sets time used to parse the query, including 2 parts: tokenizing and transforming tokens into an iterator tree.

public SearchStats.Builder setRankingStrategy(int rankingStrategy)

Sets strategy of scoring and ranking.

public SearchStats.Builder setScoredDocumentCount(int scoredDocumentCount)

Sets number of documents scored.

public SearchStats.Builder setScoringLatencyMillis(int scoringLatencyMillis)

Sets time used to score the raw results.

public SearchStats.Builder setRankingLatencyMillis(int rankingLatencyMillis)

Sets time used to rank the scored results.

public SearchStats.Builder setDocumentRetrievingLatencyMillis(int documentRetrievingLatencyMillis)

Sets time used to fetch the document protos.

public SearchStats.Builder setResultWithSnippetsCount(int resultWithSnippetsCount)

Sets how many snippets are calculated.

public SearchStats.Builder setNativeLockAcquisitionLatencyMillis(int nativeLockAcquisitionLatencyMillis)

Sets time passed while waiting to acquire the lock during native function calls.

public SearchStats.Builder setJavaToNativeJniLatencyMillis(int javaToNativeJniLatencyMillis)

Sets time used to send data across the JNI boundary from java to native side.

public SearchStats.Builder setNativeToJavaJniLatencyMillis(int nativeToJavaJniLatencyMillis)

Sets time used to send data across the JNI boundary from native to java side.

public SearchStats.Builder setJoinType(int joinType)

Sets whether or not this is a join query

public SearchStats.Builder setNativeNumJoinedResultsCurrentPage(int nativeNumJoinedResultsCurrentPage)

Set the total number of joined documents in a page.

public SearchStats.Builder setNativeJoinLatencyMillis(int nativeJoinLatencyMillis)

Sets time it takes to join documents together in icing.

public SearchStats.Builder setSearchSourceLogTag(java.lang.String searchSourceLogTag)

Sets a tag to indicate the source of this search.

public SearchStats build()

Constructs a new SearchStats from the contents of this SearchStats.Builder.