Skip to content

Commit

Permalink
Refactor Systrace.traceSection() to unblock CI (facebook#46994)
Browse files Browse the repository at this point in the history
Summary:

This diff makes a small refactor on Systrace.traceSection() to unblock CI, which was broken by D64141515 

changelog: [internal] internal

Reviewed By: Abbondanzo

Differential Revision: D64276651
  • Loading branch information
mdvacca authored and facebook-github-bot committed Oct 12, 2024
1 parent 401991c commit 06417a2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ public object Systrace {
@JvmStatic public fun traceInstant(tag: Long, title: String?, scope: EventScope?): Unit = Unit

@JvmStatic
public fun traceSection(tag: Long, sectionName: String, block: () -> T) {
beginSection(sectionName)
public fun <T> traceSection(tag: Long, sectionName: String, block: () -> T): T {
beginSection(tag, sectionName)
try {
return block()
} finally {
endSection(sectionName)
endSection(tag)
}
}

Expand Down

0 comments on commit 06417a2

Please sign in to comment.