Documentation ¶
Overview ¶
Package activity parses activity manager events in bugreport files and outputs CSV entries for those events.
Index ¶
Constants ¶
const ( // EventLogSection is the heading found in the log line before the start of the event log section. EventLogSection = "EVENT LOG" // SystemLogSection is the heading found in the log line before the start of the system log section. SystemLogSection = "SYSTEM LOG" // LastLogcatSection is the heading found in the log line before the start of the last logcat section. LastLogcatSection = "LAST LOGCAT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogsData ¶
type LogsData struct { // Logs is a map from section name to Log data. Logs map[string]*Log Warnings []string Errs []error }
LogsData contains the CSV generated from the system and event logs and the start times of the logs.
func Parse ¶
func Parse(pkgs []*usagepb.PackageInfo, f string) LogsData
Parse writes a CSV entry for each line matching activity manager proc start and died, ANR and low memory events. Package info is used to match crash events to UIDs. Errors encountered during parsing will be collected into an errors slice and will continue parsing remaining events.
type SystemUIDecoder ¶
SystemUIDecoder maps from IDs found in sysui events to the corresponding event name. frameworks/base/proto/src/metrics_constants.proto
func (SystemUIDecoder) MarshalJSON ¶
func (s SystemUIDecoder) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface to marshal SystemUIDecoder into valid JSON.