commit | 033041eab02b5e1843ac20afa7f25c45c8812403 | [log] [tgz] |
---|---|---|
author | Rui Qiu <ruiqiu@google.com> | Mon Jun 21 14:59:11 2021 -0700 |
committer | Rui Qiu <ruiqiu@google.com> | Fri Jul 02 10:56:56 2021 +0000 |
tree | 925e6df96d65699f2d4e9d2e045183bb981bdba0 | |
parent | b2d891d691954155c6e203383465a7e1f2231d0f [diff] |
Execute scripts based on the publication of data or a signal from system monitor This CL contains CarTelemetryService-internal implementation and threading model. We will move all cartelemetry operation on the same thread. The following changes are included: (1) use a priority number instead of enabling a set of publishers (2) a priority queue of ScriptExecutionTask (containing a reference to a subscriber and data) is created. When a certain event happens, the task will be scheduled and the pq gets polled. (3) event driven task scheduling using a handler (4) move the add and remove metrics config logic to handler thread Bug: 190862594 Test: m CarService Test: atest CarServiceUnitTest:DataBrokerUnitTest Change-Id: I45e7d9768370f7ce803248a254713128bfd3f51d
Native (C++) code format is required to be compatible with .clang-format file. Run
git clang-format --style=file --extension='h,cpp,cc' HEAD~
Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.