ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

class PerformanceCounter(IPerformanceCounter): (source)

Constructor: PerformanceCounter()

View In Hierarchy

Undocumented

Async Method __aenter__ Enter the async context manager and start the counter asynchronously.
Async Method __aexit__ Exit the async context manager and stop the counter asynchronously.
Method __enter__ Enter the context manager and start the counter.
Method __exit__ Exit the context manager and stop the counter.
Method __init__ Initialize the PerformanceCounter instance.
Async Method aelapsedTime Return the elapsed time in seconds asynchronously.
Async Method agetMicroseconds Return the elapsed time in microseconds asynchronously.
Async Method agetMilliseconds Return the elapsed time in milliseconds asynchronously.
Async Method agetMinutes Return the elapsed time in minutes asynchronously.
Async Method agetSeconds Return the elapsed time in seconds asynchronously.
Async Method arestart Restart the performance counter asynchronously.
Async Method astart Start the performance counter asynchronously.
Async Method astop Stop the performance counter asynchronously.
Method elapsedTime Return the elapsed time in seconds between the last start and stop calls.
Method getMicroseconds Return the elapsed time in microseconds.
Method getMilliseconds Return the elapsed time in milliseconds.
Method getMinutes Return the elapsed time in minutes.
Method getSeconds Return the elapsed time in seconds.
Method restart Restart the performance counter.
Method start Start the performance counter.
Method stop Stop the performance counter and compute elapsed time.
Class Variable __slots__ Undocumented
Instance Variable _diff_time Undocumented
Instance Variable _is_async_mode Undocumented
Instance Variable _start_time Undocumented
async def __aenter__(self) -> Self: (source)

Enter the async context manager and start the counter asynchronously.

Returns
PerformanceCounterThis instance of the performance counter.
async def __aexit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None): (source)

Exit the async context manager and stop the counter asynchronously.

Parameters
exc_type:type or NoneException type if raised, else None.
exc_val:BaseException or NoneException value if raised, else None.
exc_tb:object or NoneTraceback object if exception occurred, else None.
Returns
NoneThis method does not return a value.
def __enter__(self) -> Self: (source)

Enter the context manager and start the counter.

Returns
PerformanceCounterThis instance of the performance counter.
def __exit__(self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None): (source)

Exit the context manager and stop the counter.

Parameters
exc_type:type or NoneException type if raised, else None.
exc_val:BaseException or NoneException value if raised, else None.
exc_tb:object or NoneTraceback object if exception occurred, else None.
Returns
NoneThis method does not return a value.
def __init__(self): (source)

Initialize the PerformanceCounter instance.

Initializes internal attributes for tracking start, end, and elapsed time.

Returns
NoneThis constructor does not return a value.
async def aelapsedTime(self) -> float: (source)

Return the elapsed time in seconds asynchronously.

Returns
floatElapsed time in seconds as a float.
Raises
ValueErrorIf the counter has not been started and stopped properly.
async def agetMicroseconds(self) -> float: (source)

Return the elapsed time in microseconds asynchronously.

Returns
floatElapsed time in microseconds as a float.
async def agetMilliseconds(self) -> float: (source)

Return the elapsed time in milliseconds asynchronously.

Returns
floatElapsed time in milliseconds as a float.
async def agetMinutes(self) -> float: (source)

Return the elapsed time in minutes asynchronously.

Returns
floatElapsed time in minutes as a float.
async def agetSeconds(self) -> float: (source)

Return the elapsed time in seconds asynchronously.

Returns
floatElapsed time in seconds as a float.
async def arestart(self) -> PerformanceCounter: (source)

Restart the performance counter asynchronously.

Resets internal timing attributes and starts the counter again in async mode.

Returns
PerformanceCounterThis instance for method chaining.
async def astart(self) -> PerformanceCounter: (source)

Start the performance counter asynchronously.

Records the current high-resolution time for an asynchronous measurement.

Returns
PerformanceCounterThe current instance for method chaining.
async def astop(self) -> PerformanceCounter: (source)

Stop the performance counter asynchronously.

Records the current high-resolution time as the end time and computes the elapsed time since astart() was called.

Returns
PerformanceCounterThis instance for method chaining.
Raises
RuntimeErrorIf called after synchronous start.
def elapsedTime(self) -> float: (source)

Return the elapsed time in seconds between the last start and stop calls.

Returns
floatElapsed time in seconds as a float.
Raises
ValueErrorIf the counter has not been started and stopped properly.
def getMicroseconds(self) -> float: (source)

Return the elapsed time in microseconds.

Converts the elapsed time in seconds to microseconds.

Returns
floatElapsed time in microseconds.
def getMilliseconds(self) -> float: (source)

Return the elapsed time in milliseconds.

Converts the elapsed time in seconds to milliseconds.

Returns
floatElapsed time in milliseconds as a float.
def getMinutes(self) -> float: (source)

Return the elapsed time in minutes.

Returns
floatElapsed time in minutes as a float.
def getSeconds(self) -> float: (source)

Return the elapsed time in seconds.

Returns
floatElapsed time in seconds as a float.
def restart(self) -> PerformanceCounter: (source)

Restart the performance counter.

Resets internal timing attributes and starts the counter again. Useful for measuring a new interval without creating a new instance.

Returns
PerformanceCounterThis instance for method chaining.

Start the performance counter.

Records the current high-resolution time as the start time.

Returns
PerformanceCounterThis instance for method chaining.

Stop the performance counter and compute elapsed time.

Records the current high-resolution time as the end time and computes the elapsed time since start() was called.

Returns
PerformanceCounterThe current instance for method chaining.
Raises
RuntimeErrorIf called after asynchronous start.
ValueErrorIf called before start.
_diff_time: float | None = (source)

Undocumented

_is_async_mode: bool = (source)

Undocumented

_start_time: float | None = (source)

Undocumented