mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 10:30:42 +00:00
Optimization when Terra Profiler is not running
Do not set Profiler SAFE Threadlocal var when profiler is not running but ensure it is set to false after the profiler stops to ensure consistent behavior
This commit is contained in:
@@ -57,7 +57,7 @@ public class ProfilerImpl implements Profiler {
|
||||
Stack<Frame> stack = THREAD_STACK.get();
|
||||
stack.push(new Frame(stack.isEmpty() ? frame : stack.peek().getId() + "." + frame));
|
||||
} else SAFE.set(false);
|
||||
} else SAFE.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -99,6 +99,7 @@ public class ProfilerImpl implements Profiler {
|
||||
public void stop() {
|
||||
logger.info("Stopping Terra profiler");
|
||||
running = false;
|
||||
SAFE.set(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user