checkinutil

package
v0.0.0-...-53aec40 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package checkinutil contains common/utility functions and data structures that are used in parsing of checkin format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCSV

func ParseCSV(content string) [][]string

ParseCSV parses the content of a CSV file into a two-dimensional slice of strings.

Types

type BatteryReport

type BatteryReport struct {
	TimeUsec          int64 // End time, therefore, the time this report was taken.
	TimeZone          string
	AndroidID         int64
	DeviceGroup       []string
	CheckinRule       []string
	BuildID           string // aka. Build Fingerprint
	Product           string
	Radio             string
	Bootloader        string
	SDKVersion        int32
	IsAltMode         bool // True if the android wear device is paired to an ALT mode companion
	CellOperator      string
	CountryCode       string
	RawBatteryStats   [][]string
	RawPackageManager [][]string
}

BatteryReport is a lightweight struct (compared to BatteryStats proto) to store Android checkin reports including batterystats and package manager dumps.

type ChildInfo

type ChildInfo struct {
	// predefined parent name (e.g., GOOGLE_SERVICES for gms and gsf)
	Parent string
	// true if the app is HeadChild
	Head bool
}

ChildInfo contains linkage information for App.Child.

type Counter

type Counter interface {
	Count(name string, inc int)
}

Counter is a wrapper for mapreduce counter. (e.g., mr.MapIO and mr.ReduceIO)

type IntCounter

type IntCounter int

IntCounter implements Counter.

func (*IntCounter) Count

func (c *IntCounter) Count(_ string, inc int)

Count increments the underlying int by inc.

type PrefixCounter

type PrefixCounter struct {
	Prefix  string
	Counter Counter
}

PrefixCounter is a wrapper that allows including a prefix to counted names.

func (*PrefixCounter) Count

func (c *PrefixCounter) Count(name string, inc int)

Count increments the named counter by inc.

Jump to

Keyboard shortcuts

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