Home
last modified time | relevance | path

Searched refs:MetricsUtils (Results 1 – 24 of 24) sorted by relevance

/packages/modules/StatsD/tests/src/android/cts/statsd/metric/
DDurationMetricsTests.java68 MetricsUtils.startAtomMatcherWithLabel(APP_BREADCRUMB_REPORTED_A_MATCH_START_ID, in testDurationMetric()
71 MetricsUtils.stopAtomMatcherWithLabel(APP_BREADCRUMB_REPORTED_A_MATCH_STOP_ID, in testDurationMetric()
75 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in testDurationMetric()
85 .setId(MetricsUtils.StringToId("Predicate")) in testDurationMetric()
92 .setId(MetricsUtils.DURATION_METRIC_ID) in testDurationMetric()
112 assertThat(metricReport.getMetricId()).isEqualTo(MetricsUtils.DURATION_METRIC_ID); in testDurationMetric()
127 AtomMatcher startAtomMatcher = MetricsUtils.startAtomMatcherWithLabel( in testDurationMetricWithCondition()
129 AtomMatcher stopAtomMatcher = MetricsUtils.stopAtomMatcherWithLabel( in testDurationMetricWithCondition()
131 AtomMatcher conditionStartAtomMatcher = MetricsUtils.startAtomMatcherWithLabel( in testDurationMetricWithCondition()
133 AtomMatcher conditionStopAtomMatcher = MetricsUtils.stopAtomMatcherWithLabel( in testDurationMetricWithCondition()
[all …]
DValueMetricsTests.java73 MetricsUtils.startAtomMatcher(APP_BREADCRUMB_REPORTED_A_MATCH_START_ID); in testValueMetric()
75 MetricsUtils.stopAtomMatcher(APP_BREADCRUMB_REPORTED_A_MATCH_STOP_ID); in testValueMetric()
77 MetricsUtils.simpleAtomMatcher(APP_BREADCRUMB_REPORTED_B_MATCH_START_ID); in testValueMetric()
80 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in testValueMetric()
87 .setId(MetricsUtils.VALUE_METRIC_ID) in testValueMetric()
119 assertThat(metricReport.getMetricId()).isEqualTo(MetricsUtils.VALUE_METRIC_ID); in testValueMetric()
129 MetricsUtils.assertBucketTimePresent(bucketInfo); in testValueMetric()
145 MetricsUtils.startAtomMatcher(predicateTrueName.hashCode()); in testPullerAcrossBuckets()
147 MetricsUtils.stopAtomMatcher(predicateFalseName.hashCode()); in testPullerAcrossBuckets()
150 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in testPullerAcrossBuckets()
[all …]
DGaugeMetricsTests.java78 MetricsUtils.startAtomMatcher(APP_BREADCRUMB_REPORTED_A_MATCH_START_ID); in testGaugeMetric()
80 MetricsUtils.stopAtomMatcher(APP_BREADCRUMB_REPORTED_A_MATCH_STOP_ID); in testGaugeMetric()
82 MetricsUtils.simpleAtomMatcher(APP_BREADCRUMB_REPORTED_B_MATCH_START_ID); in testGaugeMetric()
85 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in testGaugeMetric()
96 .setId(MetricsUtils.StringToId("Predicate")) in testGaugeMetric()
106 .setId(MetricsUtils.GAUGE_METRIC_ID) in testGaugeMetric()
161 assertThat(metricReport.getMetricId()).isEqualTo(MetricsUtils.GAUGE_METRIC_ID); in testGaugeMetric()
170 MetricsUtils.assertBucketTimePresent(data.getBucketInfo(0)); in testGaugeMetric()
177 MetricsUtils.assertBucketTimePresent(data.getBucketInfo(1)); in testGaugeMetric()
180 MetricsUtils.assertBucketTimePresent(data.getBucketInfo(bucketCount - 1)); in testGaugeMetric()
[all …]
DCountMetricsTests.java60 DeviceUtils.installTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_APK, in setUp()
61 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, mCtsBuild); in setUp()
69 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in tearDown()
81 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in testSimpleEventCountMetric()
83 .setId(MetricsUtils.COUNT_METRIC_ID) in testSimpleEventCountMetric()
86 .addAtomMatcher(MetricsUtils.simpleAtomMatcher(matcherId)); in testSimpleEventCountMetric()
99 assertThat(metricReport.getMetricId()).isEqualTo(MetricsUtils.COUNT_METRIC_ID); in testSimpleEventCountMetric()
115 MetricsUtils.unspecifiedAtomMatcher(whatMatcherId); in testEventCountWithCondition()
118 MetricsUtils.startAtomMatcher(startMatcherId); in testEventCountWithCondition()
121 MetricsUtils.stopAtomMatcher(endMatcherId); in testEventCountWithCondition()
[all …]
DMetricActivationTests.java84 MetricsUtils.simpleAtomMatcher(metric1MatcherId, metric1MatcherId); in createConfig()
86 MetricsUtils.simpleAtomMatcher(metric2MatcherId, metric2MatcherId); in createConfig()
88 MetricsUtils.simpleAtomMatcher(metric3MatcherId, metric3MatcherId); in createConfig()
89 AtomMatcher act1Matcher = MetricsUtils.simpleAtomMatcher(act1MatcherId, act1MatcherId); in createConfig()
91 MetricsUtils.simpleAtomMatcher(act1CancelMatcherId, act1CancelMatcherId); in createConfig()
92 AtomMatcher act2Matcher = MetricsUtils.simpleAtomMatcher(act2MatcherId, act2MatcherId); in createConfig()
94 MetricsUtils.simpleAtomMatcher(act2CancelMatcherId, act2CancelMatcherId); in createConfig()
106 MetricsUtils.createEventActivation(act1TtlSecs, act1MatcherId, act1CancelMatcherId) in createConfig()
111 MetricsUtils.createEventActivation(act2TtlSecs, act2MatcherId, act2CancelMatcherId) in createConfig()
116 MetricsUtils.createEventActivation(act1TtlSecs, act1MatcherId, act1CancelMatcherId) in createConfig()
[all …]
DMetricsUtils.java45 public class MetricsUtils { class
/packages/modules/StatsD/tests/src/android/cts/statsd/uidmap/
DUidMapTests.java20 import android.cts.statsd.metric.MetricsUtils;
54 DeviceUtils.installTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_APK, in setUp()
55 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, mCtsBuild); in setUp()
63 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in tearDown()
76 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testUidSnapshotIncluded()
108 getDevice().uninstallPackage(MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in testChangeFromInstallation()
110 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testChangeFromInstallation()
116 buildHelper.getTestFile(MetricsUtils.DEVICE_SIDE_TEST_APK), false, true); in testChangeFromInstallation()
125 int uid = DeviceUtils.getAppUid(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in testChangeFromInstallation()
138 getDevice().installPackage(buildHelper.getTestFile(MetricsUtils.DEVICE_SIDE_TEST_APK), in testChangeFromReinstall()
[all …]
/packages/modules/StatsD/tests/src/android/cts/statsd/validation/
DDirectoryValidationTest.java5 import android.cts.statsd.metric.MetricsUtils;
24 DeviceUtils.installTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_APK, in setUp()
25 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, mCtsBuild); in setUp()
31 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in tearDown()
41 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testStatsActiveMetricDirectoryExists()
46 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testStatsDataDirectoryExists()
51 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testStatsMetadataDirectoryExists()
56 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testStatsServiceDirectoryExists()
61 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testTrainInfoDirectoryExists()
DStatsFrameworkInitializerTest.java21 import android.cts.statsd.metric.MetricsUtils;
37 DeviceUtils.installTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_APK, in setUp()
38 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, mCtsBuild); in setUp()
44 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in tearDown()
55 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testStatsFrameworkInitializer_failsWhenCalledOutsideOfSystemServiceRegistry()
DProcStatsValidationTests.java21 import android.cts.statsd.metric.MetricsUtils;
70 DeviceUtils.executeBackgroundService(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testProcessStateByPulling()
77 DeviceUtils.executeBackgroundService(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testProcessStateByPulling()
87 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in testProcessStateByPulling()
291 android.service.procstats.ProcessStatsSectionProto sectionProto = MetricsUtils.getDump( in getAllProcStatsProtoForStatsd()
DValidationTests.java21 import android.cts.statsd.metric.MetricsUtils;
82 DeviceUtils.installTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_APK, in setUp()
83 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, mCtsBuild); in setUp()
93 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in tearDown()
135 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, atomTag, true); // True: uses attribution. in testPartialWakelock()
136 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, ".AtomTests", in testPartialWakelock()
162 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in testPartialWakelockDuration()
178 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, ".AtomTests", in testPartialWakelockDuration()
214 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, ".AtomTests", in testPartialWakelockLoad()
222 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in testPartialWakelockLoad()
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/
DMetricsUtilsTest.java58 private static final MetricsUtils.LogHistParms HIST1 = new MetricsUtils.LogHistParms(0, 1, 10,
67 private static final MetricsUtils.LogHistParms HIST2 = new MetricsUtils.LogHistParms(-20, 2, 5,
114 MetricsUtils.GenericBucket[] phb1 = MetricsUtils.logHistogramToGenericBuckets(hist1, HIST1); in testHistBucketing()
141 MetricsUtils.GenericBucket[] phb2 = MetricsUtils.logHistogramToGenericBuckets(hist2, HIST2); in testHistBucketing()
177 MetricsUtils.GenericBucket[] phb = MetricsUtils.linearHistogramToGenericBuckets(hist, in testLinearHistBucketing()
190 MetricsUtils.LogHistParms hp, int expectedKey, int expectedValue) { in bucketValueAndVerify()
191 MetricsUtils.addValueToLogHistogram(value, h, hp); in bucketValueAndVerify()
197 MetricsUtils.addValueToLinearHistogram(value, h, hp); in bucketValueAndVerify()
201 private void validateProtoHistBucket(String prefix, MetricsUtils.GenericBucket bucket, in validateProtoHistBucket()
/packages/modules/StatsD/tests/src/android/cts/statsd/alarm/
DAlarmTests.java20 import android.cts.statsd.metric.MetricsUtils;
61 DeviceUtils.installTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_APK, in setUp()
62 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, mCtsBuild); in setUp()
74 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in tearDown()
87 String markTime = MetricsUtils.getCurrentLogcatDate(getDevice()); in testAlarm()
91 assertThat(MetricsUtils.didIncidentdFireSince(getDevice(), markTime)).isTrue(); in testAlarm()
97 return ConfigUtils.createConfigBuilder(MetricsUtils.DEVICE_SIDE_TEST_PACKAGE) in getBaseConfig()
/packages/modules/StatsD/tests/src/android/cts/statsd/restricted/
DReadRestrictedStatsPermissionTest.java5 import android.cts.statsd.metric.MetricsUtils;
24 DeviceUtils.installTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_APK, in setUp()
25 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, mCtsBuild); in setUp()
31 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in tearDown()
41 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testReadRestrictedStatsPermission()
/packages/modules/StatsD/tests/src/android/cts/statsd/metadata/
DMetadataTestCase.java22 import android.cts.statsd.metric.MetricsUtils;
49 StatsdStatsReport report = MetricsUtils.getDump(getDevice(), StatsdStatsReport.parser(), in getStatsdStatsReport()
60 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in getBaseConfig()
71 DeviceUtils.installTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_APK, in setUp()
72 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, mCtsBuild); in setUp()
80 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in tearDown()
DMetadataTests.java21 import android.cts.statsd.metric.MetricsUtils;
128 DeviceUtils.runDeviceTests(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testAtomLossInfoCollection()
178 getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, ".StatsdStressLogging", in testSystemServerLossErrorCode()
246 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, in testAtomIdLossDistributionCollection()
/packages/modules/StatsD/tests/src/android/cts/statsd/alert/
DAnomalyDetectionTests.java21 import android.cts.statsd.metric.MetricsUtils;
98 DeviceUtils.installTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_APK, in setUp()
99 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, mCtsBuild); in setUp()
117 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in tearDown()
151 String markTime = MetricsUtils.getCurrentLogcatDate(getDevice()); in testCountAnomalyDetection()
159 assertThat(MetricsUtils.didIncidentdFireSince(getDevice(), markTime)).isFalse(); in testCountAnomalyDetection()
169 assertThat(MetricsUtils.didIncidentdFireSince(getDevice(), markTime)).isFalse(); in testCountAnomalyDetection()
179 assertThat(MetricsUtils.didIncidentdFireSince(getDevice(), markTime)).isFalse(); in testCountAnomalyDetection()
191 assertThat(MetricsUtils.didIncidentdFireSince(getDevice(), markTime)).isTrue(); in testCountAnomalyDetection()
219 String markTime = MetricsUtils.getCurrentLogcatDate(getDevice()); in testDurationAnomalyDetection()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/aware/
DWifiAwareMetrics.java37 import com.android.server.wifi.util.MetricsUtils;
63 private static final MetricsUtils.LogHistParms DURATION_LOG_HISTOGRAM =
64 new MetricsUtils.LogHistParms(0, 1, 10, 9, 8);
181 MetricsUtils.addValueToLogHistogram(now - mLastEnableUsageMs, in recordDisableUsage()
212 MetricsUtils.addValueToLogHistogram(now - mLastEnableAwareMs, in recordDisableAware()
263 MetricsUtils.addValueToLogHistogram(mClock.getElapsedSinceBootMillis() - creationTime, in recordAttachSessionDuration()
357 MetricsUtils.addValueToLinearHistogram(minRange, mHistogramSubscribeGeofenceMin, in recordDiscoverySessionInternal()
361 MetricsUtils.addValueToLinearHistogram(maxRange, mHistogramSubscribeGeofenceMax, in recordDiscoverySessionInternal()
407 MetricsUtils.addValueToLogHistogram(mClock.getElapsedSinceBootMillis() - creationTime, in recordDiscoverySessionDuration()
540 MetricsUtils.addValueToLogHistogram(creationTime, mNdpCreationTimeDuration, in recordNdpStatus()
[all …]
/packages/modules/StatsD/tests/src/android/cts/statsd/atom/
DProcStateTestCase.java21 import android.cts.statsd.metric.MetricsUtils;
76 DeviceUtils.installTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_APK, in setUp()
77 MetricsUtils.DEVICE_SIDE_TEST_PACKAGE, mCtsBuild); in setUp()
85 DeviceUtils.uninstallTestApp(getDevice(), MetricsUtils.DEVICE_SIDE_TEST_PACKAGE); in tearDown()
/packages/modules/Wifi/service/java/com/android/server/wifi/rtt/
DRttMetrics.java19 import static com.android.server.wifi.util.MetricsUtils.addValueToLinearHistogram;
20 import static com.android.server.wifi.util.MetricsUtils.addValueToLogHistogram;
21 import static com.android.server.wifi.util.MetricsUtils.linearHistogramToGenericBuckets;
22 import static com.android.server.wifi.util.MetricsUtils.logHistogramToGenericBuckets;
36 import com.android.server.wifi.util.MetricsUtils;
66 private static final MetricsUtils.LogHistParms COUNT_LOG_HISTOGRAM =
67 new MetricsUtils.LogHistParms(0, 1, 10, 1, 7);
371 MetricsUtils.GenericBucket[] genericHistogram) { in genericBucketsToRttBuckets()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareMetricsTest.java46 import com.android.server.wifi.util.MetricsUtils;
91 private static final MetricsUtils.LogHistParms HIST1 = new MetricsUtils.LogHistParms(0, 1,
100 private static final MetricsUtils.LogHistParms HIST2 = new MetricsUtils.LogHistParms(-20, 2,
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DMetricsUtils.java28 public class MetricsUtils { class
/packages/modules/Wifi/service/java/com/android/server/wifi/
DWifiMetrics.java138 import com.android.server.wifi.util.MetricsUtils;
992 MetricsUtils.convertNetworkSelectionDisableReasonToWifiProtoEnum( in convertToNetworkDisableReason()
1006 .mapToInt(i -> MetricsUtils.convertBssidBlocklistReasonToWifiProtoEnum(i)) in convertToNetworkDisableReason()
5881 MetricsUtils.GenericBucket[] genericBuckets = in makeWifiConfigStoreIODurationBucketArray()
5882 MetricsUtils.linearHistogramToGenericBuckets(sia, in makeWifiConfigStoreIODurationBucketArray()
7960 MetricsUtils.addValueToLinearHistogram(timeMs, mWifiConfigStoreReadDurationHistogram,
7972 MetricsUtils.addValueToLinearHistogram(timeMs, mWifiConfigStoreWriteDurationHistogram,
/packages/modules/Wifi/service/tests/wifitests/
DAndroid.bp1247 "com.android.server.wifi.util.MetricsUtils",
1248 "com.android.server.wifi.util.MetricsUtils$*",
1249 "com.android.server.wifi.util.MetricsUtils.**",