diff options
author | Carmen Jackson <carmenjackson@google.com> | 2019-01-10 23:27:23 -0800 |
---|---|---|
committer | Carmen Jackson <carmenjackson@google.com> | 2019-02-05 20:47:49 -0800 |
commit | 09ead82d19a03b8f1aa47f1480f0be9be1d8e97b (patch) | |
tree | d41ce6be2bc74bd6ed5dfece8c2973cb48dd1a86 /res/values | |
parent | 5686e603f55d545b984c0e870fed5e0b1ff94ec3 (diff) | |
download | android_packages_apps_Traceur-09ead82d19a03b8f1aa47f1480f0be9be1d8e97b.tar.gz android_packages_apps_Traceur-09ead82d19a03b8f1aa47f1480f0be9be1d8e97b.tar.bz2 android_packages_apps_Traceur-09ead82d19a03b8f1aa47f1480f0be9be1d8e97b.zip |
Add long trace support to Traceur
This change adds support for long traces in Traceur. including adding
additional UI parameters for the size and duration of long traces. These
parameters will be passed to Perfetto, and the trace will continue until
it meets either the size or the duration limit.
Perfetto will communicate back to Traceur that the trace is completed
using the setprop command defined in the traceur.rc file. The selinux
changes required to process that command are in the other commit in this
topic.
Note that we are exporting a separate service specifically for stopping
the trace, so that starting a trace is not also exported outside of the
Traceur app.
Bug: 116754134
Test: manual. Started a trace and stopped it via the quick settings
tile as well as via Perfetto ending the trace manually. In both cases
verified that the UX of the notifications worked correctly.
Change-Id: I309e699fb243396a56ac2f6edf4b617266ef8e4a
Diffstat (limited to 'res/values')
-rw-r--r-- | res/values/buffer_sizes.xml | 21 | ||||
-rw-r--r-- | res/values/preference_keys.xml | 3 | ||||
-rw-r--r-- | res/values/strings.xml | 5 |
3 files changed, 29 insertions, 0 deletions
diff --git a/res/values/buffer_sizes.xml b/res/values/buffer_sizes.xml index b9bed7c..83d0831 100644 --- a/res/values/buffer_sizes.xml +++ b/res/values/buffer_sizes.xml @@ -12,4 +12,25 @@ <item>65536</item> </string-array> +<!-- Sizes are in MB. --> +<string name="default_long_trace_size">16384</string> + +<string-array name="long_trace_size_values"> + <item>4096</item> + <item>8192</item> + <item>@string/default_long_trace_size</item> + <item>32768</item> + <item>65536</item> +</string-array> + +<!-- Durations are in minutes. --> +<string name="default_long_trace_duration">30</string> + +<string-array name="long_trace_duration_values"> + <item>10</item> + <item>@string/default_long_trace_duration</item> + <item>60</item> + <item>480</item> + <item>720</item> +</string-array> </resources> diff --git a/res/values/preference_keys.xml b/res/values/preference_keys.xml index da6cabe..471aaf8 100644 --- a/res/values/preference_keys.xml +++ b/res/values/preference_keys.xml @@ -5,6 +5,9 @@ <string name="pref_key_tags">current_tags_3</string> <string name="pref_key_apps">all_apps</string> <string name="pref_key_buffer_size">buffer_size</string> + <string name="pref_key_long_traces">long_traces</string> + <string name="pref_key_max_long_trace_size">max_long_trace_size</string> + <string name="pref_key_max_long_trace_duration">max_long_trace_duration</string> <string name="pref_key_quick_setting">quick_setting_enabled</string> <string name="pref_key_use_perfetto">use_perfetto</string> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 36386b6..1a016e6 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -77,4 +77,9 @@ <string name="dont_show_again">Don\'t show again</string> <!-- Checkbox that indicates that we should use Perfetto to take traces. This feature is in beta. --> <string name="use_perfetto_beta">Use Perfetto (beta)</string> + + <string name="long_traces">Long traces</string> + <string name="long_traces_summary">Long traces are saved continuously to device storage.</string> + <string name="max_long_trace_size">Maximum long trace size</string> + <string name="max_long_trace_duration">Maximum long trace duration</string> </resources> |