activity

package
v0.0.0-...-d2356ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2017 License: Apache-2.0 Imports: 14 Imported by: 11

Documentation

Overview

Package activity parses activity manager events in bugreport files and outputs CSV entries for those events.

Index

Constants

View Source
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 Log

type Log struct {
	StartMs int64
	CSV     string
}

Log contains the CSV generated from the log as well as the start time of the log.

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.

func (LogsData) String

func (ld LogsData) String() string

String returns a string representation of the LogsData.

type SystemUIDecoder

type SystemUIDecoder map[int32]string

SystemUIDecoder maps from IDs found in sysui events to the corresponding event name. frameworks/base/proto/src/metrics_constants.proto

func Decoder

func Decoder() SystemUIDecoder

Decoder returns the decoder map for sysui events.

func (SystemUIDecoder) MarshalJSON

func (s SystemUIDecoder) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface to marshal SystemUIDecoder into valid JSON.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL