Skip to content

Commit

Permalink
more linting
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonwatson committed Aug 2, 2024
1 parent d107257 commit 1da1101
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/main/java/frc/lib/profiling/Profiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public sealed interface Profiler permits EmptyProfiler, LoggingProfiler, Validat
/**
* Called at the top of the main loop. Indicates the profiler is at "root" and records the start
* time. Within the main loop, no meaningful work should occur before this call.
*
*
* @throws RuntimeException if called twice without a call to {@link #endTick() endTick} in
* between.
*/
Expand All @@ -48,7 +48,7 @@ public sealed interface Profiler permits EmptyProfiler, LoggingProfiler, Validat
* Called at the bottom of the main loop. Indicates the profiler's "root" is finished, and its
* time usage metrics are updated. Within the main loop, no meaningful work should occur after
* this call.
*
*
* @throws RuntimeException if the profile stack is not empty or {@link #startTick() startTick}
* has not been called.
*/
Expand All @@ -57,15 +57,15 @@ public sealed interface Profiler permits EmptyProfiler, LoggingProfiler, Validat
/**
* The profile stack is pushed with the {@code location} as its top. Must be accompanied by a
* call to {@link #pop() pop}.
*
*
* @throws RuntimeException if {@link #startTick() startTick} hasn't been called yet.
*/
void push(String location);

/**
* The profile stack is popped. Must be preceded (at some point) by a call to
* {@link #push(String) push}.
*
*
* @throws RuntimeException if {@link #startTick() startTick} hasn't been called yet or the
* profile stack is empty.
*/
Expand All @@ -74,7 +74,7 @@ public sealed interface Profiler permits EmptyProfiler, LoggingProfiler, Validat
/**
* The top of the profile stack is replaced with {@code location}. This is equivalent to a call
* to {@link #pop() pop} followed immediately by a call to {@link #push(String) push}.
*
*
* @throws RuntimeException if the profile stack is empty.
*/
default void swap(String location) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public Robot() {
case kReplay -> profiler = EmptyProfiler.INSTANCE;
case kSimulation -> profiler = new LoggingProfiler(() -> Logger.getRealTimestamp(),
1000000.0, TextProfileLoggingFormat.INSTANCE);
// case kSimulation -> profiler = ValidatingProfiler.INSTANCE;
default -> {
}
}
// Logger.disableDeterministicTimestamps() // See "Deterministic Timestamps" in the
// "Understanding Data Flow" page
Expand Down

0 comments on commit 1da1101

Please sign in to comment.