Home
last modified time | relevance | path

Searched refs:CanonicalCode (Results 1 – 21 of 21) sorted by relevance

/external/opencensus-java/api/src/main/java/io/opencensus/trace/
DStatus.java49 public enum CanonicalCode { enum in Status
210 private CanonicalCode(int value) { in CanonicalCode() method in Status.CanonicalCode
240 for (CanonicalCode code : CanonicalCode.values()) { in buildStatusList()
260 public static final Status OK = CanonicalCode.OK.toStatus();
267 public static final Status CANCELLED = CanonicalCode.CANCELLED.toStatus();
274 public static final Status UNKNOWN = CanonicalCode.UNKNOWN.toStatus();
281 public static final Status INVALID_ARGUMENT = CanonicalCode.INVALID_ARGUMENT.toStatus();
288 public static final Status DEADLINE_EXCEEDED = CanonicalCode.DEADLINE_EXCEEDED.toStatus();
295 public static final Status NOT_FOUND = CanonicalCode.NOT_FOUND.toStatus();
302 public static final Status ALREADY_EXISTS = CanonicalCode.ALREADY_EXISTS.toStatus();
[all …]
/external/icing/icing/absl_ports/
Dcanonical_errors.cc118 return status.CanonicalCode() == libtextclassifier3::StatusCode::CANCELLED; in IsCancelled()
121 return status.CanonicalCode() == libtextclassifier3::StatusCode::UNKNOWN; in IsUnknown()
124 return status.CanonicalCode() == in IsInvalidArgument()
128 return status.CanonicalCode() == in IsDeadlineExceeded()
132 return status.CanonicalCode() == libtextclassifier3::StatusCode::NOT_FOUND; in IsNotFound()
135 return status.CanonicalCode() == in IsAlreadyExists()
139 return status.CanonicalCode() == in IsPermissionDenied()
143 return status.CanonicalCode() == in IsResourceExhausted()
147 return status.CanonicalCode() == in IsFailedPrecondition()
151 return status.CanonicalCode() == libtextclassifier3::StatusCode::ABORTED; in IsAborted()
[all …]
Dannotate.cc38 return libtextclassifier3::Status(s.CanonicalCode(), new_msg); in Annotate()
/external/libtextclassifier/native/utils/base/
Dstatus_test.cc30 EXPECT_EQ(Status::UNKNOWN.CanonicalCode(), StatusCode::UNKNOWN); in TEST()
39 EXPECT_EQ(Status::OK.CanonicalCode(), StatusCode::OK); in TEST()
46 EXPECT_EQ(Status::UNKNOWN.CanonicalCode(), StatusCode::UNKNOWN); in TEST()
52 EXPECT_EQ(Status::OK.CanonicalCode(), StatusCode::OK); in TEST()
59 EXPECT_EQ(status.CanonicalCode(), StatusCode::INVALID_ARGUMENT); in TEST()
69 EXPECT_EQ(status2.CanonicalCode(), StatusCode::INVALID_ARGUMENT); in TEST()
85 EXPECT_EQ(status.CanonicalCode(), StatusCode::OK); in TEST()
102 EXPECT_EQ(status.CanonicalCode(), StatusCode::INVALID_ARGUMENT); in TEST()
120 EXPECT_EQ(status.CanonicalCode(), StatusCode::UNKNOWN); in TEST()
137 EXPECT_EQ(status.CanonicalCode(), StatusCode::OK); in TEST()
[all …]
Dstatus.h67 StatusCode CanonicalCode() const { return code_; } in CanonicalCode() function
Dstatusor_test.cc58 EXPECT_EQ(error_or.status().CanonicalCode(), StatusCode::UNKNOWN); in TEST()
/external/opencensus-java/contrib/grpc_util/src/test/java/io/opencensus/contrib/grpc/util/
DStatusConverterTest.java32 io.opencensus.trace.Status.CanonicalCode opencensusCanonicalCode = in convertFromGrpcCode()
62 for (io.opencensus.trace.Status.CanonicalCode opencensusCanonicalCode : in convertToGrpcCode()
63 io.opencensus.trace.Status.CanonicalCode.values()) { in convertToGrpcCode()
72 for (io.opencensus.trace.Status.CanonicalCode opencensusCanonicalCode : in convertToGrpcStatus()
73 io.opencensus.trace.Status.CanonicalCode.values()) { in convertToGrpcStatus()
82 for (io.opencensus.trace.Status.CanonicalCode opencensusCanonicalCode : in convertToGrpcStatus()
83 io.opencensus.trace.Status.CanonicalCode.values()) { in convertToGrpcStatus()
/external/opencensus-java/api/src/main/java/io/opencensus/trace/export/
DSampledSpanStore.java23 import io.opencensus.trace.Status.CanonicalCode;
194 Map<CanonicalCode, Integer> numbersOfErrorSampledSpans) { in create() argument
201 new HashMap<CanonicalCode, Integer>( in create()
225 public abstract Map<CanonicalCode, Integer> getNumbersOfErrorSampledSpans(); in getNumbersOfErrorSampledSpans()
433 String spanName, @Nullable CanonicalCode canonicalCode, int maxSpansToReturn) { in create()
435 Utils.checkArgument(canonicalCode != CanonicalCode.OK, "Invalid canonical code."); in create()
457 public abstract CanonicalCode getCanonicalCode(); in getCanonicalCode()
474 Collections.<CanonicalCode, Integer>emptyMap());
/external/opencensus-java/impl_core/src/main/java/io/opencensus/implcore/trace/export/
DInProcessSampledSpanStoreImpl.java23 import io.opencensus.trace.Status.CanonicalCode;
48 private static final int NUM_ERROR_BUCKETS = CanonicalCode.values().length - 1;
177 private Bucket getErrorBucket(CanonicalCode code) { in getErrorBucket()
207 private Map<CanonicalCode, Integer> getNumbersOfErrorSampledSpans() { in getNumbersOfErrorSampledSpans()
208 Map<CanonicalCode, Integer> errorBucketSummaries = in getNumbersOfErrorSampledSpans()
209 new EnumMap<CanonicalCode, Integer>(CanonicalCode.class); in getNumbersOfErrorSampledSpans()
211 errorBucketSummaries.put(CanonicalCode.values()[i + 1], errorBuckets[i].getNumSamples()); in getNumbersOfErrorSampledSpans()
217 @Nullable CanonicalCode code, int maxSpansToReturn) { in getErrorSamples()
/external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/trace/export/
DInProcessSampledSpanStoreImplTest.java32 import io.opencensus.trace.Status.CanonicalCode;
132 for (CanonicalCode code : CanonicalCode.values()) { in addSpanNameToAllErrorBuckets()
133 if (code != CanonicalCode.OK) { in addSpanNameToAllErrorBuckets()
195 Map<CanonicalCode, Integer> errorBucketsSummaries = in addSpansWithRegisteredNamesInAllErrorBuckets()
197 assertThat(errorBucketsSummaries.size()).isEqualTo(CanonicalCode.values().length - 1); in addSpansWithRegisteredNamesInAllErrorBuckets()
198 for (Map.Entry<CanonicalCode, Integer> it : errorBucketsSummaries.entrySet()) { in addSpansWithRegisteredNamesInAllErrorBuckets()
219 ErrorFilter.create(REGISTERED_SPAN_NAME, CanonicalCode.CANCELLED, 0)); in getErrorSampledSpans()
236 ErrorFilter.create(REGISTERED_SPAN_NAME, CanonicalCode.CANCELLED, 1)); in getErrorSampledSpans_MaxSpansToReturn()
/external/opencensus-java/contrib/zpages/src/test/java/io/opencensus/contrib/zpages/
DTracezZPageHandlerTest.java22 import io.opencensus.trace.Status.CanonicalCode;
59 Map<CanonicalCode, Integer> numbersOfErrorSampledSpans = new HashMap<>(); in setUp()
60 numbersOfErrorSampledSpans.put(CanonicalCode.CANCELLED, 2); in setUp()
61 numbersOfErrorSampledSpans.put(CanonicalCode.DEADLINE_EXCEEDED, 5); in setUp()
/external/icing/icing/testing/
Dcommon-matchers.h303 StatusCodeToString(adapter.status().CanonicalCode()).c_str(),
312 StatusCodeToString(arg.status().CanonicalCode()).c_str(),
321 if (adapter.status().CanonicalCode() == status_code) {
327 StatusCodeToString(adapter.status().CanonicalCode()).c_str(),
334 if (adapter.status().CanonicalCode() != status_code) {
338 StatusCodeToString(adapter.status().CanonicalCode()).c_str(),
/external/opencensus-java/api/src/test/java/io/opencensus/trace/
DStatusTest.java31 assertThat(Status.OK.getCanonicalCode()).isEqualTo(Status.CanonicalCode.OK); in status_Ok()
39 assertThat(status.getCanonicalCode()).isEqualTo(Status.CanonicalCode.UNKNOWN); in createStatus_WithDescription()
/external/opencensus-java/contrib/grpc_util/src/main/java/io/opencensus/contrib/grpc/util/
DStatusConverter.java33 public static io.opencensus.trace.Status.CanonicalCode fromGrpcCode( in fromGrpcCode()
62 io.opencensus.trace.Status.CanonicalCode opencensusCanonicalCode) { in toGrpcCode()
124 io.opencensus.trace.Status.CanonicalCode opencensusCanonicalCode) { in grpcStatusFromOpencensusCanonicalCode()
/external/opencensus-java/api/src/test/java/io/opencensus/trace/export/
DNoopSampledSpanStoreTest.java22 import io.opencensus.trace.Status.CanonicalCode;
37 Collections.<CanonicalCode, Integer>emptyMap());
/external/opencensus-java/examples/src/main/java/io/opencensus/examples/grpc/helloworld/
DHelloWorldClient.java36 import io.opencensus.trace.Status.CanonicalCode;
90 CanonicalCode.valueOf(e.getStatus().getCode().name()) in greet()
/external/opencensus-java/contrib/zpages/src/main/java/io/opencensus/contrib/zpages/
DTracezZPageHandler.java33 import io.opencensus.trace.Status.CanonicalCode;
231 if (subtype < 0 || subtype >= CanonicalCode.values().length) { in emitHtmlBody()
235 CanonicalCode code = subtype == 0 ? null : CanonicalCode.values()[subtype]; in emitHtmlBody()
483 Map<CanonicalCode, Integer> errorBucketsSummaries = in emitSummaryTable()
486 for (Map.Entry<CanonicalCode, Integer> it : errorBucketsSummaries.entrySet()) { in emitSummaryTable()
/external/icing/icing/text_classifier/lib3/utils/base/
Dstatus.h65 StatusCode CanonicalCode() const { return code_; } in CanonicalCode() function
/external/opencensus-java/exporters/stats/stackdriver/src/main/java/io/opencensus/exporter/stats/stackdriver/
DStackdriverExporterWorker.java154 Status.CanonicalCode.valueOf(e.getStatusCode().getCode().name()) in registerView()
200 Status.CanonicalCode.valueOf(e.getStatusCode().getCode().name()) in export()
/external/icing/icing/store/
Ddocument-store.cc885 document_id_or.status().CanonicalCode(), in Get()
897 status_or.status().CanonicalCode(), in Get()
1130 if (corpus_scoring_data_or.status().CanonicalCode() == in GetCorpusAssociatedScoreDataToUpdate()
/external/icing/icing/
Dicing-search-engine.cc178 switch (internal_status.CanonicalCode()) { in TransformStatus()