• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2020 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15service carwatchdogd /system/bin/carwatchdogd
16    class core
17    user system
18    group system readproc
19    disabled
20
21on early-init && property:ro.build.type=userdebug
22    # Below intervals are in seconds
23    setprop ro.carwatchdog.boottime_collection_interval 1
24    setprop ro.carwatchdog.periodic_collection_interval 60
25    setprop ro.carwatchdog.periodic_monitor_interval 5
26
27on early-init && property:ro.build.type=eng
28    # Below intervals are in seconds
29    setprop ro.carwatchdog.boottime_collection_interval 1
30    setprop ro.carwatchdog.periodic_collection_interval 60
31    setprop ro.carwatchdog.periodic_monitor_interval 5
32
33on early-init && property:ro.build.type=user
34    # Below intervals are in seconds
35    setprop ro.carwatchdog.boottime_collection_interval 20
36    setprop ro.carwatchdog.periodic_collection_interval 120
37    setprop ro.carwatchdog.periodic_monitor_interval 5
38
39on early-init
40    # Number of top stats per category
41    setprop ro.carwatchdog.top_n_stats_per_category 10
42
43    # Number of top stats per sub-category
44    setprop ro.carwatchdog.top_n_stats_per_subcategory 5
45
46    # Cache size for the periodically collected records
47    setprop ro.carwatchdog.periodic_collection_buffer_size 180
48
49    # Cache size for the periodically monitored records
50    setprop ro.carwatchdog.periodic_monitor_buffer_size 360
51
52    # Start the service only after initializing the properties.
53    start carwatchdogd
54