Added expected_value and actual_value data to slow_start_reason_with_details.
bug: 308460401
test: diff_tests
Change-Id: I872193be038b7dcad112fa307efae65d2a8908af
diff --git a/protos/perfetto/metrics/android/startup_metric.proto b/protos/perfetto/metrics/android/startup_metric.proto
index 4a93ebc..372dbb3 100644
--- a/protos/perfetto/metrics/android/startup_metric.proto
+++ b/protos/perfetto/metrics/android/startup_metric.proto
@@ -305,6 +305,7 @@
NS = 1;
PERCENTAGE = 2;
TRUE_OR_FALSE = 3;
+ COUNT = 4;
}
optional ThresholdUnit unit = 2;
diff --git a/protos/perfetto/metrics/perfetto_merged_metrics.proto b/protos/perfetto/metrics/perfetto_merged_metrics.proto
index ad2d6b2..1efc020 100644
--- a/protos/perfetto/metrics/perfetto_merged_metrics.proto
+++ b/protos/perfetto/metrics/perfetto_merged_metrics.proto
@@ -2421,6 +2421,7 @@
NS = 1;
PERCENTAGE = 2;
TRUE_OR_FALSE = 3;
+ COUNT = 4;
}
optional ThresholdUnit unit = 2;
diff --git a/python/perfetto/trace_processor/metrics.descriptor b/python/perfetto/trace_processor/metrics.descriptor
index f212c89..4b44534 100644
--- a/python/perfetto/trace_processor/metrics.descriptor
+++ b/python/perfetto/trace_processor/metrics.descriptor
Binary files differ
diff --git a/src/trace_processor/metrics/sql/android/startup/slow_start_reasons.sql b/src/trace_processor/metrics/sql/android/startup/slow_start_reasons.sql
index 8108fa6..9165f80 100644
--- a/src/trace_processor/metrics/sql/android/startup/slow_start_reasons.sql
+++ b/src/trace_processor/metrics/sql/android/startup/slow_start_reasons.sql
@@ -206,11 +206,18 @@
SELECT RepeatedField(AndroidStartupMetric_SlowStartReason(
'reason_id', reason_id,
'reason', slow_cause,
- 'launch_dur', launch_dur))
+ 'launch_dur', launch_dur,
+ 'expected_value', expected_val,
+ 'actual_value', actual_val))
FROM (
- SELECT 'No baseline or cloud profiles' AS slow_cause,
+ SELECT 'No baseline or cloud profiles' as slow_cause,
launch.dur as launch_dur,
- 'NO_BASELINE_OR_CLOUD_PROFILES' as reason_id
+ 'NO_BASELINE_OR_CLOUD_PROFILES' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', FALSE,
+ 'unit', 'TRUE_OR_FALSE') as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', TRUE) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND missing_baseline_profile_for_launch(launch.startup_id, launch.package)
@@ -218,7 +225,12 @@
UNION ALL
SELECT 'Optimized artifacts missing, run from apk' as slow_cause,
launch.dur as launch_dur,
- 'RUN_FROM_APK' as reason_id
+ 'RUN_FROM_APK' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', FALSE,
+ 'unit', 'TRUE_OR_FALSE') as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', TRUE) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND run_from_apk_for_launch(launch.startup_id)
@@ -226,7 +238,12 @@
UNION ALL
SELECT 'Unlock running during launch' as slow_cause,
launch.dur as launch_dur,
- 'UNLOCK_RUNNING' as reason_id
+ 'UNLOCK_RUNNING' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', FALSE,
+ 'unit', 'TRUE_OR_FALSE') as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', TRUE) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND is_unlock_running_during_launch(launch.startup_id)
@@ -234,7 +251,12 @@
UNION ALL
SELECT 'App in debuggable mode' as slow_cause,
launch.dur as launch_dur,
- 'APP_IN_DEBUGGABLE_MODE' as reason_id
+ 'APP_IN_DEBUGGABLE_MODE' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', FALSE,
+ 'unit', 'TRUE_OR_FALSE') as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', TRUE) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND is_process_debuggable(launch.package)
@@ -242,7 +264,12 @@
UNION ALL
SELECT 'GC Activity' as slow_cause,
launch.dur as launch_dur,
- 'GC_ACTIVITY' as reason_id
+ 'GC_ACTIVITY' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', FALSE,
+ 'unit', 'TRUE_OR_FALSE') as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', TRUE) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND total_gc_time_by_launch(launch.startup_id) > 0
@@ -250,7 +277,12 @@
UNION ALL
SELECT 'dex2oat running during launch' AS slow_cause,
launch.dur as launch_dur,
- 'DEX2OAT_RUNNING' as reason_id
+ 'DEX2OAT_RUNNING' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', FALSE,
+ 'unit', 'TRUE_OR_FALSE') as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', TRUE) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id AND
dur_of_process_running_concurrent_to_launch(launch.startup_id, '*dex2oat64') > 0
@@ -258,7 +290,12 @@
UNION ALL
SELECT 'installd running during launch' AS slow_cause,
launch.dur as launch_dur,
- 'INSTALLD_RUNNING' as reason_id
+ 'INSTALLD_RUNNING' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', FALSE,
+ 'unit', 'TRUE_OR_FALSE') as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', TRUE) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id AND
dur_of_process_running_concurrent_to_launch(launch.startup_id, '*installd') > 0
@@ -266,7 +303,15 @@
UNION ALL
SELECT 'Main Thread - Time spent in Runnable state' as slow_cause,
launch.dur as launch_dur,
- 'MAIN_THREAD_TIME_SPENT_IN_RUNNABLE' as reason_id
+ 'MAIN_THREAD_TIME_SPENT_IN_RUNNABLE' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 15,
+ 'unit', 'PERCENTAGE',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value',
+ main_thread_time_for_launch_in_runnable_state(launch.startup_id) * 100 / launch.dur,
+ 'dur', main_thread_time_for_launch_in_runnable_state(launch.startup_id)) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND main_thread_time_for_launch_in_runnable_state(launch.startup_id) > launch.dur * 0.15
@@ -274,7 +319,13 @@
UNION ALL
SELECT 'Main Thread - Time spent in interruptible sleep state' as slow_cause,
launch.dur as launch_dur,
- 'MAIN_THREAD_TIME_SPENT_IN_INTERRUPTIBLE_SLEEP' as reason_id
+ 'MAIN_THREAD_TIME_SPENT_IN_INTERRUPTIBLE_SLEEP' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 2900000000,
+ 'unit', 'NS',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', main_thread_time_for_launch_and_state(launch.startup_id, 'S')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND main_thread_time_for_launch_and_state(launch.startup_id, 'S') > 2900e6
@@ -282,7 +333,14 @@
UNION ALL
SELECT 'Main Thread - Time spent in Blocking I/O' as slow_cause,
launch.dur as launch_dur,
- 'MAIN_THREAD_TIME_SPENT_IN_BLOCKING_IO' as reason_id
+ 'MAIN_THREAD_TIME_SPENT_IN_BLOCKING_IO' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 450000000,
+ 'unit', 'NS',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', main_thread_time_for_launch_state_and_io_wait(
+ launch.startup_id, 'D*', TRUE)) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND main_thread_time_for_launch_state_and_io_wait(launch.startup_id, 'D*', TRUE) > 450e6
@@ -290,7 +348,16 @@
UNION ALL
SELECT 'Main Thread - Time spent in OpenDexFilesFromOat*' as slow_cause,
launch.dur as launch_dur,
- 'MAIN_THREAD_TIME_SPENT_IN_OPEN_DEX_FILES_FROM_OAT' as reason_id
+ 'MAIN_THREAD_TIME_SPENT_IN_OPEN_DEX_FILES_FROM_OAT' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 20,
+ 'unit', 'PERCENTAGE',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', android_sum_dur_on_main_thread_for_startup_and_slice(
+ launch.startup_id, 'OpenDexFilesFromOat*') * 100 / launch.dur,
+ 'dur', android_sum_dur_on_main_thread_for_startup_and_slice(
+ launch.startup_id, 'OpenDexFilesFromOat*')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id AND
android_sum_dur_on_main_thread_for_startup_and_slice(
@@ -299,7 +366,14 @@
UNION ALL
SELECT 'Time spent in bindApplication' as slow_cause,
launch.dur as launch_dur,
- 'TIME_SPENT_IN_BIND_APPLICATION' as reason_id
+ 'TIME_SPENT_IN_BIND_APPLICATION' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 1250000000,
+ 'unit', 'NS',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', android_sum_dur_for_startup_and_slice(
+ launch.startup_id, 'bindApplication')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND android_sum_dur_for_startup_and_slice(launch.startup_id, 'bindApplication') > 1250e6
@@ -307,7 +381,14 @@
UNION ALL
SELECT 'Time spent in view inflation' as slow_cause,
launch.dur as launch_dur,
- 'TIME_SPENT_IN_VIEW_INFLATION' as reason_id
+ 'TIME_SPENT_IN_VIEW_INFLATION' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 450000000,
+ 'unit', 'NS',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', android_sum_dur_for_startup_and_slice(
+ launch.startup_id, 'inflate')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND android_sum_dur_for_startup_and_slice(launch.startup_id, 'inflate') > 450e6
@@ -315,7 +396,14 @@
UNION ALL
SELECT 'Time spent in ResourcesManager#getResources' as slow_cause,
launch.dur as launch_dur,
- 'TIME_SPENT_IN_RESOURCES_MANAGER_GET_RESOURCES' as reason_id
+ 'TIME_SPENT_IN_RESOURCES_MANAGER_GET_RESOURCES' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 130000000,
+ 'unit', 'NS',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', android_sum_dur_for_startup_and_slice(
+ launch.startup_id, 'ResourcesManager#getResources')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND android_sum_dur_for_startup_and_slice(
@@ -324,7 +412,16 @@
UNION ALL
SELECT 'Time spent verifying classes' as slow_cause,
launch.dur as launch_dur,
- 'TIME_SPENT_VERIFYING_CLASSES' as reason_id
+ 'TIME_SPENT_VERIFYING_CLASSES' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 15,
+ 'unit', 'PERCENTAGE',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', android_sum_dur_for_startup_and_slice(
+ launch.startup_id, 'VerifyClass*') * 100 / launch.dur,
+ 'dur', android_sum_dur_for_startup_and_slice(
+ launch.startup_id, 'VerifyClass*')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id AND
android_sum_dur_for_startup_and_slice(launch.startup_id, 'VerifyClass*')
@@ -333,7 +430,14 @@
UNION ALL
SELECT 'Potential CPU contention with another process' AS slow_cause,
launch.dur as launch_dur,
- 'POTENTIAL_CPU_CONTENTION_WITH_ANOTHER_PROCESS' as reason_id
+ 'POTENTIAL_CPU_CONTENTION_WITH_ANOTHER_PROCESS' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 100000000,
+ 'unit', 'NS',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value',
+ main_thread_time_for_launch_in_runnable_state(launch.startup_id)) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id AND
main_thread_time_for_launch_in_runnable_state(launch.startup_id) > 100e6 AND
@@ -342,7 +446,14 @@
UNION ALL
SELECT 'JIT Activity' as slow_cause,
launch.dur as launch_dur,
- 'JIT_ACTIVITY' as reason_id
+ 'JIT_ACTIVITY' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 100000000,
+ 'unit', 'NS',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', thread_time_for_launch_state_and_thread(
+ launch.startup_id, 'Running', 'Jit thread pool')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND thread_time_for_launch_state_and_thread(
@@ -354,7 +465,16 @@
UNION ALL
SELECT 'Main Thread - Lock contention' as slow_cause,
launch.dur as launch_dur,
- 'MAIN_THREAD_LOCK_CONTENTION' as reason_id
+ 'MAIN_THREAD_LOCK_CONTENTION' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 20,
+ 'unit', 'PERCENTAGE',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', android_sum_dur_on_main_thread_for_startup_and_slice(
+ launch.startup_id, 'Lock contention on*') * 100 / launch.dur,
+ 'dur', android_sum_dur_on_main_thread_for_startup_and_slice(
+ launch.startup_id, 'Lock contention on*')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND android_sum_dur_on_main_thread_for_startup_and_slice(
@@ -365,18 +485,35 @@
UNION ALL
SELECT 'Main Thread - Monitor contention' as slow_cause,
launch.dur as launch_dur,
- 'MAIN_THREAD_MONITOR_CONTENTION' as reason_id
+ 'MAIN_THREAD_MONITOR_CONTENTION' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 15,
+ 'unit', 'PERCENTAGE',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', android_sum_dur_on_main_thread_for_startup_and_slice(
+ launch.startup_id, 'Lock contention on a monitor*') * 100 / launch.dur,
+ 'dur', android_sum_dur_on_main_thread_for_startup_and_slice(
+ launch.startup_id, 'Lock contention on a monitor*')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND android_sum_dur_on_main_thread_for_startup_and_slice(
- launch.startup_id,
- 'Lock contention on a monitor*'
- ) > launch.dur * 0.15
+ launch.startup_id,
+ 'Lock contention on a monitor*'
+ ) > launch.dur * 0.15
UNION ALL
SELECT 'JIT compiled methods' as slow_cause,
launch.dur as launch_dur,
- 'JIT_COMPILED_METHODS' as reason_id
+ 'JIT_COMPILED_METHODS' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 65,
+ 'unit', 'COUNT',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', (SELECT COUNT(1)
+ FROM ANDROID_SLICES_FOR_STARTUP_AND_SLICE_NAME(launch.startup_id, 'JIT compiling*')
+ WHERE thread_name = 'Jit thread pool')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND (
@@ -387,7 +524,14 @@
UNION ALL
SELECT 'Broadcast dispatched count' as slow_cause,
launch.dur as launch_dur,
- 'BROADCAST_DISPATCHED_COUNT' as reason_id
+ 'BROADCAST_DISPATCHED_COUNT' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 15,
+ 'unit', 'COUNT',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', count_slices_concurrent_to_launch(launch.startup_id,
+ 'Broadcast dispatched*')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND count_slices_concurrent_to_launch(
@@ -397,17 +541,29 @@
UNION ALL
SELECT 'Broadcast received count' as slow_cause,
launch.dur as launch_dur,
- 'BROADCAST_RECEIVED_COUNT' as reason_id
+ 'BROADCAST_RECEIVED_COUNT' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', 50,
+ 'unit', 'COUNT',
+ 'higher_expected', FALSE) as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', count_slices_concurrent_to_launch(launch.startup_id,
+ 'broadcastReceiveReg*')) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND count_slices_concurrent_to_launch(
- launch.startup_id,
- 'broadcastReceiveReg*') > 50
+ launch.startup_id,
+ 'broadcastReceiveReg*') > 50
UNION ALL
SELECT 'Startup running concurrent to launch' as slow_cause,
launch.dur as launch_dur,
- 'STARTUP_RUNNING_CONCURRENT' as reason_id
+ 'STARTUP_RUNNING_CONCURRENT' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', FALSE,
+ 'unit', 'TRUE_OR_FALSE') as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', TRUE) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND EXISTS(
@@ -419,7 +575,12 @@
UNION ALL
SELECT 'Main Thread - Binder transactions blocked' as slow_cause,
launch.dur as launch_dur,
- 'MAIN_THREAD_BINDER_TRANSCATIONS_BLOCKED' as reason_id
+ 'MAIN_THREAD_BINDER_TRANSCATIONS_BLOCKED' as reason_id,
+ AndroidStartupMetric_ThresholdValue(
+ 'value', FALSE,
+ 'unit', 'TRUE_OR_FALSE') as expected_val,
+ AndroidStartupMetric_ActualValue(
+ 'value', TRUE) as actual_val
FROM android_startups launch
WHERE launch.startup_id = $startup_id
AND (
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup.out b/test/trace_processor/diff_tests/metrics/startup/android_startup.out
index 9928efb..b78b3f4 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup.out
@@ -70,6 +70,15 @@
slow_start_reason_with_details {
reason_id: MAIN_THREAD_TIME_SPENT_IN_RUNNABLE
reason: "Main Thread - Time spent in Runnable state"
+ expected_value {
+ value: 15
+ unit: PERCENTAGE
+ higher_expected: false
+ }
+ actual_value {
+ value: 74
+ dur: 80
+ }
launch_dur: 108
}
startup_type: "warm"
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_attribution.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_attribution.out
index 30a1b23..7905eff 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_attribution.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_attribution.out
@@ -137,16 +137,39 @@
slow_start_reason_with_details {
reason_id: GC_ACTIVITY
reason: "GC Activity"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 999999900
}
slow_start_reason_with_details {
reason_id: MAIN_THREAD_TIME_SPENT_IN_OPEN_DEX_FILES_FROM_OAT
reason: "Main Thread - Time spent in OpenDexFilesFromOat*"
+ expected_value {
+ value: 20
+ unit: PERCENTAGE
+ higher_expected: false
+ }
+ actual_value {
+ value: 49
+ dur: 499999845
+ }
launch_dur: 999999900
}
slow_start_reason_with_details {
reason_id: MAIN_THREAD_BINDER_TRANSCATIONS_BLOCKED
reason: "Main Thread - Binder transactions blocked"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 999999900
}
}
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_attribution_slow.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_attribution_slow.out
index cd305f1..565ec02 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_attribution_slow.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_attribution_slow.out
@@ -101,16 +101,39 @@
slow_start_reason_with_details {
reason_id: GC_ACTIVITY
reason: "GC Activity"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 999999900000000000
}
slow_start_reason_with_details {
reason_id: JIT_ACTIVITY
reason: "JIT Activity"
+ expected_value {
+ value: 100000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 20000000000
+ }
launch_dur: 999999900000000000
}
slow_start_reason_with_details {
reason_id: JIT_COMPILED_METHODS
reason: "JIT compiled methods"
+ expected_value {
+ value: 65
+ unit: COUNT
+ higher_expected: false
+ }
+ actual_value {
+ value: 71
+ }
launch_dur: 999999900000000000
}
}
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_breakdown.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_breakdown.out
index e91c756..00717fe 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_breakdown.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_breakdown.out
@@ -122,31 +122,77 @@
slow_start_reason_with_details {
reason_id: NO_BASELINE_OR_CLOUD_PROFILES
reason: "No baseline or cloud profiles"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: RUN_FROM_APK
reason: "Optimized artifacts missing, run from apk"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: TIME_SPENT_IN_BIND_APPLICATION
reason: "Time spent in bindApplication"
+ expected_value {
+ value: 1250000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 2000000000
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: TIME_SPENT_IN_VIEW_INFLATION
reason: "Time spent in view inflation"
+ expected_value {
+ value: 450000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 2000000000
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: TIME_SPENT_IN_RESOURCES_MANAGER_GET_RESOURCES
reason: "Time spent in ResourcesManager#getResources"
+ expected_value {
+ value: 130000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 1000000000
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: POTENTIAL_CPU_CONTENTION_WITH_ANOTHER_PROCESS
reason: "Potential CPU contention with another process"
+ expected_value {
+ value: 100000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 5000000000
+ }
launch_dur: 108000000000
}
startup_type: "cold"
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_breakdown_slow.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_breakdown_slow.out
index bb11660..f7756d7 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_breakdown_slow.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_breakdown_slow.out
@@ -121,26 +121,65 @@
slow_start_reason_with_details {
reason_id: RUN_FROM_APK
reason: "Optimized artifacts missing, run from apk"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: TIME_SPENT_IN_BIND_APPLICATION
reason: "Time spent in bindApplication"
+ expected_value {
+ value: 1250000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 10000000000
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: TIME_SPENT_IN_VIEW_INFLATION
reason: "Time spent in view inflation"
+ expected_value {
+ value: 450000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 3000000000
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: TIME_SPENT_IN_RESOURCES_MANAGER_GET_RESOURCES
reason: "Time spent in ResourcesManager#getResources"
+ expected_value {
+ value: 130000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 5000000000
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: POTENTIAL_CPU_CONTENTION_WITH_ANOTHER_PROCESS
reason: "Potential CPU contention with another process"
+ expected_value {
+ value: 100000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 5000000000
+ }
launch_dur: 108000000000
}
startup_type: "cold"
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_broadcast_multiple.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_broadcast_multiple.out
index 7f7d68c..b1296b9 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_broadcast_multiple.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_broadcast_multiple.out
@@ -34,11 +34,27 @@
slow_start_reason_with_details {
reason_id: BROADCAST_DISPATCHED_COUNT
reason: "Broadcast dispatched count"
+ expected_value {
+ value: 15
+ unit: COUNT
+ higher_expected: false
+ }
+ actual_value {
+ value: 24
+ }
launch_dur: 100
}
slow_start_reason_with_details {
reason_id: BROADCAST_RECEIVED_COUNT
reason: "Broadcast received count"
+ expected_value {
+ value: 50
+ unit: COUNT
+ higher_expected: false
+ }
+ actual_value {
+ value: 52
+ }
launch_dur: 100
}
}
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_installd_dex2oat.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_installd_dex2oat.out
index 488e597..6b9755a 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_installd_dex2oat.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_installd_dex2oat.out
@@ -65,6 +65,13 @@
slow_start_reason_with_details {
reason_id: DEX2OAT_RUNNING
reason: "dex2oat running during launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 100
}
}
@@ -103,6 +110,13 @@
slow_start_reason_with_details {
reason_id: INSTALLD_RUNNING
reason: "installd running during launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 100
}
}
@@ -143,11 +157,25 @@
slow_start_reason_with_details {
reason_id: DEX2OAT_RUNNING
reason: "dex2oat running during launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 100
}
slow_start_reason_with_details {
reason_id: INSTALLD_RUNNING
reason: "installd running during launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 100
}
}
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_installd_dex2oat_slow.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_installd_dex2oat_slow.out
index 2cc2b16..a4a7d08 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_installd_dex2oat_slow.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_installd_dex2oat_slow.out
@@ -65,6 +65,13 @@
slow_start_reason_with_details {
reason_id: DEX2OAT_RUNNING
reason: "dex2oat running during launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 100000000000
}
}
@@ -106,16 +113,37 @@
slow_start_reason_with_details {
reason_id: DEX2OAT_RUNNING
reason: "dex2oat running during launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 250000000000
}
slow_start_reason_with_details {
reason_id: INSTALLD_RUNNING
reason: "installd running during launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 250000000000
}
slow_start_reason_with_details {
reason_id: STARTUP_RUNNING_CONCURRENT
reason: "Startup running concurrent to launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 250000000000
}
startup_concurrent_to_launch: "com.google.android.gm"
@@ -156,16 +184,37 @@
slow_start_reason_with_details {
reason_id: DEX2OAT_RUNNING
reason: "dex2oat running during launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 100000000000
}
slow_start_reason_with_details {
reason_id: INSTALLD_RUNNING
reason: "installd running during launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 100000000000
}
slow_start_reason_with_details {
reason_id: STARTUP_RUNNING_CONCURRENT
reason: "Startup running concurrent to launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 100000000000
}
startup_concurrent_to_launch: "com.google.android.deskclock"
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_lock_contention_slow.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_lock_contention_slow.out
index 05fc7d1..06336d6 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_lock_contention_slow.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_lock_contention_slow.out
@@ -75,16 +75,42 @@
slow_start_reason_with_details {
reason_id: TIME_SPENT_IN_BIND_APPLICATION
reason: "Time spent in bindApplication"
+ expected_value {
+ value: 1250000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 3000000000
+ }
launch_dur: 100000000000
}
slow_start_reason_with_details {
reason_id: MAIN_THREAD_LOCK_CONTENTION
reason: "Main Thread - Lock contention"
+ expected_value {
+ value: 20
+ unit: PERCENTAGE
+ higher_expected: false
+ }
+ actual_value {
+ value: 27
+ dur: 27000000000
+ }
launch_dur: 100000000000
}
slow_start_reason_with_details {
reason_id: MAIN_THREAD_MONITOR_CONTENTION
reason: "Main Thread - Monitor contention"
+ expected_value {
+ value: 15
+ unit: PERCENTAGE
+ higher_expected: false
+ }
+ actual_value {
+ value: 17
+ dur: 17000000000
+ }
launch_dur: 100000000000
}
startup_type: "cold"
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_minsdk33.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_minsdk33.out
index 1ee29d4..4e2e0e4 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_minsdk33.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_minsdk33.out
@@ -33,6 +33,13 @@
slow_start_reason_with_details {
reason_id: APP_IN_DEBUGGABLE_MODE
reason: "App in debuggable mode"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 100
}
}
@@ -91,6 +98,13 @@
slow_start_reason_with_details {
reason_id: APP_IN_DEBUGGABLE_MODE
reason: "App in debuggable mode"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 10
}
}
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_process_track.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_process_track.out
index efd407a..1da325f 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_process_track.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_process_track.out
@@ -69,6 +69,15 @@
slow_start_reason_with_details {
reason_id: MAIN_THREAD_TIME_SPENT_IN_RUNNABLE
reason: "Main Thread - Time spent in Runnable state"
+ expected_value {
+ value: 15
+ unit: PERCENTAGE
+ higher_expected: false
+ }
+ actual_value {
+ value: 57
+ dur: 4
+ }
launch_dur: 7
}
}
@@ -143,6 +152,15 @@
slow_start_reason_with_details {
reason_id: MAIN_THREAD_TIME_SPENT_IN_RUNNABLE
reason: "Main Thread - Time spent in Runnable state"
+ expected_value {
+ value: 15
+ unit: PERCENTAGE
+ higher_expected: false
+ }
+ actual_value {
+ value: 57
+ dur: 4
+ }
launch_dur: 7
}
}
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_slow.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_slow.out
index 1b038e6..1a04d19 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_slow.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_slow.out
@@ -73,21 +73,54 @@
slow_start_reason_with_details {
reason_id: MAIN_THREAD_TIME_SPENT_IN_RUNNABLE
reason: "Main Thread - Time spent in Runnable state"
+ expected_value {
+ value: 15
+ unit: PERCENTAGE
+ higher_expected: false
+ }
+ actual_value {
+ value: 74
+ dur: 80000000000
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: MAIN_THREAD_TIME_SPENT_IN_INTERRUPTIBLE_SLEEP
reason: "Main Thread - Time spent in interruptible sleep state"
+ expected_value {
+ value: 2900000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 5000000000
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: MAIN_THREAD_TIME_SPENT_IN_BLOCKING_IO
reason: "Main Thread - Time spent in Blocking I/O"
+ expected_value {
+ value: 450000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 5000000000
+ }
launch_dur: 108000000000
}
slow_start_reason_with_details {
reason_id: POTENTIAL_CPU_CONTENTION_WITH_ANOTHER_PROCESS
reason: "Potential CPU contention with another process"
+ expected_value {
+ value: 100000000
+ unit: NS
+ higher_expected: false
+ }
+ actual_value {
+ value: 80000000000
+ }
launch_dur: 108000000000
}
}
diff --git a/test/trace_processor/diff_tests/metrics/startup/android_startup_unlock.out b/test/trace_processor/diff_tests/metrics/startup/android_startup_unlock.out
index cf87a52..62ec295 100644
--- a/test/trace_processor/diff_tests/metrics/startup/android_startup_unlock.out
+++ b/test/trace_processor/diff_tests/metrics/startup/android_startup_unlock.out
@@ -33,6 +33,13 @@
slow_start_reason_with_details {
reason_id: UNLOCK_RUNNING
reason: "Unlock running during launch"
+ expected_value {
+ value: 0
+ unit: TRUE_OR_FALSE
+ }
+ actual_value {
+ value: 1
+ }
launch_dur: 100
}
}