"""
This file is generated by generator/run.py based on the Chrome DevTools Protocol.


https://chromedevtools.github.io/devtools-protocol/tot/Profiler/

***************************************************
                    Events
***************************************************
"""
from __future__ import annotations

from cdpkit.protocol._types import (
    Debugger,
    Profiler,
)
from cdpkit.protocol.base import CDPEvent


class ConsoleProfileFinished(CDPEvent):

    id: str
    location: Debugger.Location
    profile: Profiler.Profile
    title: str | None = None


class ConsoleProfileStarted(CDPEvent):
    """ Sent when new profile recording is started using console.profile() call. """

    id: str
    location: Debugger.Location
    title: str | None = None


class PreciseCoverageDeltaUpdate(CDPEvent):
    """ Reports coverage delta since the last poll (either from an event like this, or from
    `takePreciseCoverage` for the current isolate. May only be sent if precise code
    coverage has been started. This event can be trigged by the embedder to, for example,
    trigger collection of coverage data immediately at a certain point in time. """

    timestamp: float
    occasion: str
    result: list[Profiler.ScriptCoverage]
