Android.OS.Debug.StartMethodTracing Method
Start method tracing, specifying the trace log file name and the buffer size.

Syntax

[Android.Runtime.Register("startMethodTracing", "(Ljava/lang/String;II)V", "")]
public static void StartMethodTracing (string traceName, int bufferSize, [Android.Runtime.GeneratedEnum] DebugTraceOptions flags)

Parameters

traceName
Name for the trace log file to create. If traceName is null, this value defaults to "/sdcard/dmtrace.trace". If the files already exist, they will be truncated. If the trace file given does not end in ".trace", it will be appended for you.
bufferSize
The maximum amount of trace data we gather. If not given, it defaults to 8MB.
flags
Flags to control method tracing. The only one that is currently defined is Debug.TraceCountAllocs.

Remarks

Start method tracing, specifying the trace log file name and the buffer size. The trace files will be put under "/sdcard" unless an absolute path is given. See Traceview: A Graphical Log Viewer for information about reading trace files.

When method tracing is enabled, the VM will run more slowly than usual, so the timings from the trace files should only be considered in relative terms (e.g. was run #1 faster than run #2). The times for native methods will not change, so don't try to use this to compare the performance of interpreted and native implementations of the same method. As an alternative, consider using sampling-based method tracing via Debug.StartMethodTracingSampling(string, System.Int32, System.Int32) or "native" tracing in the emulator via Debug.StartNativeTracing.

[Android Documentation]

Requirements

Namespace: Android.OS
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1