package com.livingworld.core.simulation;

/**
 * Optional profiler for tracking simulation cycle performance.
 * 
 * <p>If no implementation is provided, all calls are no-ops.</p>
 */
public interface SimulationProfiler {

    /**
     * Called at the start of a simulation cycle.
     * 
     * @param simulationTick the current simulation tick
     */
    void startCycle(long simulationTick);

    /**
     * Called when a simulation cycle completes.
     * 
     * @param durationMs the wall-clock duration in milliseconds
     */
    void endCycle(long durationMs);

    default void beginModule(String moduleId) {
    }

    default void endModule(String moduleId) {
    }

    default void recordEvent() {
    }

    default void recordRegionUpdated() {
    }

    default void recordSave() {
    }

    default void recordBudgetOverrun() {
    }
}
