Skip to content

Commit

Permalink
Scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
danicheg committed Jul 13, 2024
1 parent 662bba6 commit 5d3c9b4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions plugin/src/main/scala/ch/epfl/scala/profilers/ProfilingImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -535,18 +535,18 @@ final class ProfilingImpl[G <: Global](
private var alreadyTracking: Boolean = false

/** The default method that expands all macros. */
override def apply(desugared: Tree): Tree = {
def updateExpansionTime(desugared: Tree, start: statistics.TimerSnapshot): Unit = {
statistics.stopTimer(preciseMacroTimer, start)
val (nanos0, _) = start
val timeNanos = (preciseMacroTimer.nanos - nanos0)
val callSitePos = desugared.pos
// Those that are not present failed to expand
macroInfos.get(callSitePos).foreach { found =>
val updatedInfo = found.copy(expansionNanos = timeNanos)
macroInfos(callSitePos) = updatedInfo
override def apply(desugared: Tree): Tree = {
def updateExpansionTime(desugared: Tree, start: statistics.TimerSnapshot): Unit = {
statistics.stopTimer(preciseMacroTimer, start)
val (nanos0, _) = start
val timeNanos = (preciseMacroTimer.nanos - nanos0)
val callSitePos = desugared.pos
// Those that are not present failed to expand
macroInfos.get(callSitePos).foreach { found =>
val updatedInfo = found.copy(expansionNanos = timeNanos)
macroInfos(callSitePos) = updatedInfo
}
}
}
val shouldTrack = statistics.enabled && !alreadyTracking

val prevData = macrosStack.headOption.map { prev =>
Expand Down

0 comments on commit 5d3c9b4

Please sign in to comment.