aboutsummaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorJiayu Hu <hujiayu@google.com>2022-05-03 20:50:03 -0700
committerJiayu Hu <hujiayu@google.com>2022-05-03 20:50:03 -0700
commit21441c71652b1116c467e106e1b735a9bd90541d (patch)
treee2083eac148d0fcfb7470064e8abe2369af8e1a0 /proto
parent156c55e27d7a8fdf9c26e30dcbf09e97231efd68 (diff)
downloadicing-21441c71652b1116c467e106e1b735a9bd90541d.tar.gz
Sync from upstream.
Descriptions: ====================================================================== Export Icing logging control to JNI ====================================================================== Prepare Icing logging class for JNI export ====================================================================== Export getDebugInfo to JNI ====================================================================== Expose the return_deleted_document_info parameter for deleteByQuery JNI ====================================================================== Enable runtime log control for Icing Library ====================================================================== Fix 1 ClangTidyBuild finding: ====================================================================== Update comments to run benchmarks. ====================================================================== Making icing's own logging class ====================================================================== Convert the string lexicon debug information to a protocol buffer ====================================================================== Fix issue with printing fingerprinted key in our error logs. ====================================================================== Support dump function for IcingSearchEngine ====================================================================== Bug: 146903474 Bug: 229778472 Bug: 209071710 Bug: 222349894 Bug: 225914361 Change-Id: I9750149d1ed0b59f345b8828ff312a62773667fe
Diffstat (limited to 'proto')
-rw-r--r--proto/icing/proto/debug.proto101
1 files changed, 96 insertions, 5 deletions
diff --git a/proto/icing/proto/debug.proto b/proto/icing/proto/debug.proto
index 504ae43..061e123 100644
--- a/proto/icing/proto/debug.proto
+++ b/proto/icing/proto/debug.proto
@@ -24,6 +24,98 @@ option java_package = "com.google.android.icing.proto";
option java_multiple_files = true;
option objc_class_prefix = "ICNG";
+message LogSeverity {
+ enum Code {
+ VERBOSE = 0;
+ // Unable to use DEBUG at this time because it breaks YTM's iOS tests
+ // cs/?q=%22-DDEBUG%3D1%22%20f:%2FYoutubeMusic%20f:blueprint&ssfr=1
+ DBG = 1;
+ INFO = 2;
+ WARNING = 3;
+ ERROR = 4;
+ FATAL = 5;
+ }
+}
+
+// Next tag: 6
+message LexiconDebugInfoProto {
+ optional uint32 num_keys = 1;
+
+ // Next tag: 12
+ message NodeInfo {
+ optional uint32 num_nodes = 1;
+ optional uint32 max_nodes = 2;
+
+ // Count of intermediate nodes.
+ optional uint32 num_intermediates = 3;
+ // Total, maximum and average number of children of intermediate nodes.
+ optional uint32 sum_children = 4;
+ optional uint32 max_children = 5;
+ optional float avg_children = 6; // sum_children / num_intermediates
+
+ // Count of leaf nodes.
+ optional uint32 num_leaves = 7;
+ // Total, maximum and average depth of leaf nodes.
+ optional uint32 sum_depth = 8;
+ optional uint32 max_depth = 9;
+ optional float avg_depth = 10; // sum_depth / num_leaves;
+
+ optional uint32 dirty_pages = 11;
+ }
+ optional NodeInfo node_info = 2;
+
+ // Next tag: 10
+ message NextInfo {
+ optional uint32 num_nexts = 1;
+ optional uint32 max_nexts = 2;
+ // Count of next arrays by size. Need verbosity > 0.
+ // Index into child_counts is the number of children minus 1 and the value
+ // is the number of intermediate nodes that have that number of children.
+ repeated uint32 child_counts = 3
+ [packed = true]; // Array of size kMaxNextArraySize
+ // Wasted next array space per allocation bucket (in Nexts, not bytes).
+ // Index into wasted is log2(bucket_size).
+ // Ex. wasted[3] is the number of nexts wasted from all next arrays of size
+ // 2^3=8.
+ repeated uint32 wasted = 4
+ [packed = true]; // Array of size kNumNextAllocationBuckets
+ // Sum of wasted array.
+ optional uint32 total_wasted = 5;
+ // Next free-list stats
+ // Index into num_free is log2(bucket_size).
+ // Ex. num_free[3] is the number of free lists of size 2^3=8.
+ repeated uint32 num_free = 6
+ [packed = true]; // Array of size kNumNextAllocationBuckets
+ // Total Next nodes free (weighted sum of the above).
+ optional uint32 total_free = 7;
+ // A measure of the fragment of next arrays.
+ optional float total_frag = 8; // (total_free + total_wasted) / num_nexts
+ optional uint32 dirty_pages = 9;
+ }
+ optional NextInfo next_info = 3;
+
+ // Next tag: 6
+ message SuffixInfo {
+ optional uint32 suffixes_capacity = 1;
+ optional uint32 max_suffixes_capacity = 2;
+ // Bytes actually used by suffixes.
+ optional uint32 suffixes_used = 3;
+ // Number of suffixes that are just empty strings.
+ optional uint32 num_null_suffixes = 4;
+ optional uint32 dirty_pages = 5;
+ }
+ optional SuffixInfo suffix_info = 4;
+
+ // Next tag: 3
+ message PropertyBitmapInfo {
+ // Property id. -1 represents deleted bitmap.
+ optional int32 property_id = 1;
+ optional uint32 file_size = 2;
+ }
+ // For verbosity > 0
+ repeated PropertyBitmapInfo property_bitmaps_info = 5;
+}
+
// Next tag: 4
message IndexDebugInfoProto {
// Storage information of the index.
@@ -31,8 +123,7 @@ message IndexDebugInfoProto {
message MainIndexDebugInfoProto {
// Information about the main lexicon.
- // TODO(b/222349894) Convert the string output to a protocol buffer instead.
- optional string lexicon_info = 1;
+ optional LexiconDebugInfoProto lexicon_info = 1;
// Last added document id.
optional uint32 last_added_document_id = 2;
@@ -62,8 +153,7 @@ message IndexDebugInfoProto {
optional uint32 index_crc = 5;
// Information about the lite lexicon.
- // TODO(b/222349894) Convert the string output to a protocol buffer instead.
- optional string lexicon_info = 6;
+ optional LexiconDebugInfoProto lexicon_info = 6;
}
optional LiteIndexDebugInfoProto lite_index_info = 3;
}
@@ -117,7 +207,8 @@ message DebugInfoProto {
message DebugInfoResultProto {
// Status code can be one of:
// OK
- // FAILED_PRECONDITION
+ // FAILED_PRECONDITION if IcingSearchEngine has not been initialized yet
+ // INTERNAL on IO errors, crc compute error.
//
// See status.proto for more details.
optional StatusProto status = 1;