Annotation Interface Traced


@Retention(RUNTIME) @Target(METHOD) public @interface Traced
Annotation to mark methods for automatic tracing. Methods annotated with @Traced will have their execution time automatically measured and recorded for timeline visualization.

Usage:


 @Traced
 public void periodic() {
     // Method body - timing is automatic
 }

 @Traced("CustomName")
 private void updateState() {
     // Custom name in trace output
 }

 @Traced(category = "Drivetrain")
 public void drivetrainPeriodic() {
     // Categorized for better organization in Perfetto
 }

 @Traced(value = "CustomName", category = "Vision")
 private void processTargets() {
     // Both custom name and category
 }
 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional category/subsystem for grouping traces.
    Optional custom name for the trace.
  • Element Details

    • value

      String value
      Optional custom name for the trace. Defaults to "ClassName.methodName" if empty.
      Default:
      ""
    • category

      String category
      Optional category/subsystem for grouping traces. Examples: "Drivetrain", "Vision", "Intake". Defaults to "robot" if empty. Categories appear in Perfetto's category filter.
      Default:
      ""