# Profile Laggy Ticks Using /spark profiler

### What Does `/spark profiler` Do?

The `/spark profiler` command captures detailed performance data. With the `--only-ticks-over` option, you can filter the profile to include only laggy ticks.

### How to Use It

<div class="cl-preview-section" id="bkmrk-choose-a-thresholdus">1. **Choose a Threshold**  
    Use the tick duration from Step 1 as a reference. For example, if laggy ticks exceed 150 milliseconds:
    
    ```
    /spark profiler --only-ticks-over 150  
    
    
    ```
2. **Run the Profiler**
    
    
    - The profiler will start recording, but only for ticks exceeding the threshold.
    - Let it run long enough to capture lag events.
3. **Stop the Profiler**  
    Use:
    
    ```
    /spark profiler stop  
    
    
    ```
4. **Inspect the Results**  
    Open the profiling report and analyze the data. The laggy ticks will stand out, making it easier to identify the cause.

</div>### Example

In the profiler output, you might see a high percentage of time spent on a plugin, mod, or player action. This helps isolate the problem.

<div class="cl-preview-section" id="bkmrk-">---

</div>