object TraceUtils
TraceUtils.forceEnabled = true
TraceUtils.trace("myTrace") {
// do something
}
| Name | Summary |
|---|---|
cookie | var cookie: Int |
forceEnabled | var forceEnabled: Boolean |
| Name | Summary |
|---|---|
beginAsyncSection | fun beginAsyncSection(sectionName: String): Int Begin an async trace section. You will need to call endAsyncSection() to end the current trace section. |
beginSection | fun beginSection(sectionName: String) Begin a trace section. You will need to call endSection() to end the current trace section. You can nest trace sections. |
endAsyncSection | fun endAsyncSection(sectionName: String, id: Int) End an async trace section. Make sure you have called a beginAsyncSection() before calling this with the same id. |
endSection | fun endSection() End the current trace section. Make sure you have called a beginSection() before calling this. You are responsible for managing your trace sections. |
trace | inline fun trace(sectionName: String, block: () -> Unit) This method is a convenience method that handles the beginSection() and endSection() for you. It will run the block of code within the trace section. |
traceAsync | inline fun traceAsync(sectionName: String, block: () -> Unit) This method is a convenience method that handles the beginAsyncSection() and endAsyncSection() for you. It will run the block of code within the trace section. |