ActiveTrace

public class ActiveTrace
extends Object

java.lang.Object
   ↳ com.android.tradefed.invoker.tracing.ActiveTrace


คลาสหลักที่ช่วยอธิบายและจัดการการติดตามที่ใช้งานอยู่

สรุป

ค่าคงที่

String TRACE_KEY

เครื่องมือสร้างสาธารณะ

ActiveTrace(long pid, long tid)
ActiveTrace(long pid, long tid, boolean mainProcess)

ผู้ผลิต

เมธอดสาธารณะ

void addSubprocessTrace(File subTrace)

ระบุไฟล์การติดตามจากกระบวนการย่อยที่จะเพิ่มลงในกระบวนการหลัก

File finalizeTracing()

รายงานไฟล์การติดตามสุดท้ายและล้างข้อมูลทรัพยากรตามที่จำเป็น

boolean isMainTradefedProcess()
void reportTraceEvent(String categories, String name, PerfettoTrace.TrackEvent.Type type)
void reportTraceEvent(String categories, String name, int threadId, String threadName, PerfettoTrace.TrackEvent.Type type)

การรายงานเหตุการณ์พื้นฐานมากเพื่อทำเครื่องหมาย START / END ของการติดตาม

long reportingThreadId()

รหัสชุดข้อความของชุดข้อความที่เริ่มการติดตาม

void startTracing(boolean isSubprocess)

เริ่มการติดตามและรายงานข้อมูลเมตาของการติดตาม

ค่าคงที่

TRACE_KEY

public static final String TRACE_KEY

ค่าคงที่: "invocation-trace"

เครื่องมือสร้างสาธารณะ

ActiveTrace

public ActiveTrace (long pid, 
                long tid)

พารามิเตอร์
pid long

tid long

ActiveTrace

public ActiveTrace (long pid, 
                long tid, 
                boolean mainProcess)

ผู้ผลิต

พารามิเตอร์
pid long: รหัสกระบวนการปัจจุบัน

tid long: รหัสชุดข้อความปัจจุบัน

mainProcess boolean

เมธอดสาธารณะ

addSubprocessTrace

public void addSubprocessTrace (File subTrace)

ระบุไฟล์การติดตามจากกระบวนการย่อยที่จะเพิ่มลงในกระบวนการหลัก

พารามิเตอร์
subTrace File

finalizeTracing

public File finalizeTracing ()

รายงานไฟล์การติดตามสุดท้ายและล้างข้อมูลทรัพยากรตามที่จำเป็น

คิกรีเทิร์น
File

isMainTradefedProcess

public boolean isMainTradefedProcess ()

คิกรีเทิร์น
boolean

reportTraceEvent

public void reportTraceEvent (String categories, 
                String name, 
                PerfettoTrace.TrackEvent.Type type)

พารามิเตอร์
categories String

name String

type PerfettoTrace.TrackEvent.Type

reportTraceEvent

public void reportTraceEvent (String categories, 
                String name, 
                int threadId, 
                String threadName, 
                PerfettoTrace.TrackEvent.Type type)

การรายงานเหตุการณ์พื้นฐานมากเพื่อทำเครื่องหมาย START / END ของการติดตาม

พารามิเตอร์
categories String: หมวดหมู่ที่เชื่อมโยงกับกิจกรรม

name String: ชื่อเหตุการณ์

threadId int

threadName String

type PerfettoTrace.TrackEvent.Type: ประเภทของเหตุการณ์ที่รายงาน

reportingThreadId

public long reportingThreadId ()

รหัสชุดข้อความของชุดข้อความที่เริ่มการติดตาม

คิกรีเทิร์น
long

startTracing

public void startTracing (boolean isSubprocess)

เริ่มการติดตามและรายงานข้อมูลเมตาของการติดตาม

พารามิเตอร์
isSubprocess boolean