1// Signature format: 4.0 2package androidx.benchmark.traceprocessor { 3 4 @SuppressCompatibility @kotlin.RequiresOptIn @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.CONSTRUCTOR}) public @interface ExperimentalInsightApi { 5 } 6 7 @SuppressCompatibility @kotlin.RequiresOptIn @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) @kotlin.annotation.Target(allowedTargets={kotlin.annotation.AnnotationTarget.CLASS, kotlin.annotation.AnnotationTarget.FUNCTION, kotlin.annotation.AnnotationTarget.CONSTRUCTOR}) public @interface ExperimentalTraceProcessorApi { 8 } 9 10 @SuppressCompatibility @androidx.benchmark.traceprocessor.ExperimentalInsightApi public final class Insight { 11 ctor public Insight(androidx.benchmark.traceprocessor.Insight.Category category, String observedLabel, androidx.benchmark.traceprocessor.PerfettoTrace.Link traceLink); 12 method public androidx.benchmark.traceprocessor.Insight.Category getCategory(); 13 method public String getObservedLabel(); 14 method public androidx.benchmark.traceprocessor.PerfettoTrace.Link getTraceLink(); 15 property public androidx.benchmark.traceprocessor.Insight.Category category; 16 property public String observedLabel; 17 property public androidx.benchmark.traceprocessor.PerfettoTrace.Link traceLink; 18 } 19 20 @SuppressCompatibility @androidx.benchmark.traceprocessor.ExperimentalInsightApi public static final class Insight.Category { 21 ctor public Insight.Category(String title, String? titleUrl, String postTitleLabel); 22 method public String getPostTitleLabel(); 23 method public String getTitle(); 24 method public String? getTitleUrl(); 25 property public String postTitleLabel; 26 property public String title; 27 property public String? titleUrl; 28 } 29 30 @SuppressCompatibility @androidx.benchmark.traceprocessor.ExperimentalInsightApi public static interface Insight.Provider { 31 method public java.util.List<androidx.benchmark.traceprocessor.Insight> queryInsights(androidx.benchmark.traceprocessor.TraceProcessor.Session session, String packageName, String traceLinkTitle, String traceLinkPath); 32 } 33 34 public final class PerfettoTrace { 35 ctor public PerfettoTrace(String path); 36 field public static final androidx.benchmark.traceprocessor.PerfettoTrace.Companion Companion; 37 } 38 39 public static final class PerfettoTrace.Companion { 40 } 41 42 @SuppressCompatibility @androidx.benchmark.traceprocessor.ExperimentalInsightApi public static final class PerfettoTrace.Link { 43 ctor public PerfettoTrace.Link(String title, String path, String urlParamsEncoded); 44 ctor public PerfettoTrace.Link(String title, String path, java.util.Map<java.lang.String,java.lang.String> urlParamMap); 45 method public String getMarkdownUriLink(); 46 method public String getPath(); 47 method public String getTitle(); 48 method public String getUri(); 49 method public String getUrlParamsEncoded(); 50 property public String markdownUriLink; 51 property public String path; 52 property public String title; 53 property public String uri; 54 property public String urlParamsEncoded; 55 } 56 57 public final class Row implements kotlin.jvm.internal.markers.KMappedMarker java.util.Map<java.lang.String,java.lang.Object?> { 58 ctor public Row(java.util.Map<java.lang.String,? extends java.lang.Object?> map); 59 method public byte[] bytes(String columnName); 60 method public double double(String columnName); 61 method public long long(String columnName); 62 method public byte[]? nullableBytes(String columnName); 63 method public Double? nullableDouble(String columnName); 64 method public Long? nullableLong(String columnName); 65 method public String? nullableString(String columnName); 66 method public String string(String columnName); 67 } 68 69 public final class RowKt { 70 method public static androidx.benchmark.traceprocessor.Row rowOf(kotlin.Pair<java.lang.String,? extends java.lang.Object?>... pairs); 71 } 72 73 @SuppressCompatibility @androidx.benchmark.traceprocessor.ExperimentalTraceProcessorApi public interface ServerLifecycleManager { 74 method public int start(); 75 method public void stop(); 76 method public default String timeoutMessage(); 77 } 78 79 @SuppressCompatibility @androidx.benchmark.traceprocessor.ExperimentalInsightApi public final class StartupInsights implements androidx.benchmark.traceprocessor.Insight.Provider { 80 ctor public StartupInsights(); 81 method public java.util.List<androidx.benchmark.traceprocessor.Insight> queryInsights(androidx.benchmark.traceprocessor.TraceProcessor.Session session, String packageName, String traceLinkTitle, String traceLinkPath); 82 } 83 84 public final class TraceProcessor { 85 method public <T> T loadTrace(androidx.benchmark.traceprocessor.PerfettoTrace trace, kotlin.jvm.functions.Function1<? super androidx.benchmark.traceprocessor.TraceProcessor.Session,? extends T> block); 86 method @SuppressCompatibility @androidx.benchmark.traceprocessor.ExperimentalTraceProcessorApi public static <T> T runServer(androidx.benchmark.traceprocessor.ServerLifecycleManager serverLifecycleManager, androidx.benchmark.traceprocessor.TraceProcessor.EventCallback eventCallback, androidx.benchmark.traceprocessor.TraceProcessor.Tracer tracer, optional long timeoutMs, kotlin.jvm.functions.Function1<? super androidx.benchmark.traceprocessor.TraceProcessor,? extends T> block); 87 method @SuppressCompatibility @CheckResult @androidx.benchmark.traceprocessor.ExperimentalTraceProcessorApi public static androidx.benchmark.traceprocessor.TraceProcessor.Handle startServer(androidx.benchmark.traceprocessor.ServerLifecycleManager serverLifecycleManager, androidx.benchmark.traceprocessor.TraceProcessor.EventCallback eventCallback, androidx.benchmark.traceprocessor.TraceProcessor.Tracer tracer, optional long timeoutMs); 88 method @CheckResult public androidx.benchmark.traceprocessor.TraceProcessor.Session.Handle startSession(androidx.benchmark.traceprocessor.PerfettoTrace trace); 89 field public static final androidx.benchmark.traceprocessor.TraceProcessor.Companion Companion; 90 } 91 92 public static final class TraceProcessor.Companion { 93 method @SuppressCompatibility @androidx.benchmark.traceprocessor.ExperimentalTraceProcessorApi public <T> T runServer(androidx.benchmark.traceprocessor.ServerLifecycleManager serverLifecycleManager, androidx.benchmark.traceprocessor.TraceProcessor.EventCallback eventCallback, androidx.benchmark.traceprocessor.TraceProcessor.Tracer tracer, optional long timeoutMs, kotlin.jvm.functions.Function1<? super androidx.benchmark.traceprocessor.TraceProcessor,? extends T> block); 94 method @SuppressCompatibility @CheckResult @androidx.benchmark.traceprocessor.ExperimentalTraceProcessorApi public androidx.benchmark.traceprocessor.TraceProcessor.Handle startServer(androidx.benchmark.traceprocessor.ServerLifecycleManager serverLifecycleManager, androidx.benchmark.traceprocessor.TraceProcessor.EventCallback eventCallback, androidx.benchmark.traceprocessor.TraceProcessor.Tracer tracer, optional long timeoutMs); 95 } 96 97 public static interface TraceProcessor.EventCallback { 98 method public void onLoadTraceFailure(androidx.benchmark.traceprocessor.PerfettoTrace trace, Throwable throwable); 99 } 100 101 public static final class TraceProcessor.EventCallback.Noop implements androidx.benchmark.traceprocessor.TraceProcessor.EventCallback { 102 method public void onLoadTraceFailure(androidx.benchmark.traceprocessor.PerfettoTrace trace, Throwable throwable); 103 field public static final androidx.benchmark.traceprocessor.TraceProcessor.EventCallback.Noop INSTANCE; 104 } 105 106 public static final class TraceProcessor.Handle implements java.lang.AutoCloseable { 107 ctor public TraceProcessor.Handle(androidx.benchmark.traceprocessor.TraceProcessor traceProcessor); 108 method public void close(); 109 method public androidx.benchmark.traceprocessor.TraceProcessor getTraceProcessor(); 110 property public androidx.benchmark.traceprocessor.TraceProcessor traceProcessor; 111 } 112 113 public static final class TraceProcessor.Session { 114 method public kotlin.sequences.Sequence<androidx.benchmark.traceprocessor.Row> query(String query); 115 method public String queryMetricsJson(java.util.List<java.lang.String> metrics); 116 method public byte[] queryMetricsProtoBinary(java.util.List<java.lang.String> metrics); 117 method public String queryMetricsProtoText(java.util.List<java.lang.String> metrics); 118 method public byte[] rawQuery(String query); 119 } 120 121 public static final class TraceProcessor.Session.Handle implements java.lang.AutoCloseable { 122 ctor public TraceProcessor.Session.Handle(androidx.benchmark.traceprocessor.TraceProcessor.Session session); 123 method public void close(); 124 method public androidx.benchmark.traceprocessor.TraceProcessor.Session getSession(); 125 property public androidx.benchmark.traceprocessor.TraceProcessor.Session session; 126 } 127 128 public static class TraceProcessor.Tracer { 129 ctor public TraceProcessor.Tracer(); 130 method public void beginTraceSection(String label); 131 method public void endTraceSection(); 132 method public final inline <T> T trace(String label, kotlin.jvm.functions.Function0<? extends T> block); 133 } 134 135 public final class TraceProcessorKt { 136 method public static String processNameLikePkg(String pkg); 137 } 138 139} 140 141