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 PerformanceCounter(IPerformanceCounter): (source)
Constructor: PerformanceCounter()
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 | aelapsed |
Return the elapsed time in seconds asynchronously. |
| Async Method | aget |
Return the elapsed time in microseconds asynchronously. |
| Async Method | aget |
Return the elapsed time in milliseconds asynchronously. |
| Async Method | aget |
Return the elapsed time in minutes asynchronously. |
| Async Method | aget |
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 | elapsed |
Return the elapsed time in seconds between the last start and stop calls. |
| Method | get |
Return the elapsed time in microseconds. |
| Method | get |
Return the elapsed time in milliseconds. |
| Method | get |
Return the elapsed time in minutes. |
| Method | get |
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 |
Undocumented |
| Instance Variable | _is |
Undocumented |
| Instance Variable | _start |
Undocumented |
Enter the async context manager and start the counter asynchronously.
| Returns | |
PerformanceCounter | This instance of the performance counter. |
type[ BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None):
(source)
¶
Exit the async context manager and stop the counter asynchronously.
| Parameters | |
exctype or None | Exception type if raised, else None. |
excBaseException or None | Exception value if raised, else None. |
excobject or None | Traceback object if exception occurred, else None. |
| Returns | |
None | This method does not return a value. |
Enter the context manager and start the counter.
| Returns | |
PerformanceCounter | This instance of the performance counter. |
type[ BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None):
(source)
¶
Initialize the PerformanceCounter instance.
Initializes internal attributes for tracking start, end, and elapsed time.
| Returns | |
None | This constructor does not return a value. |
Return the elapsed time in seconds asynchronously.
| Returns | |
float | Elapsed time in seconds as a float. |
| Raises | |
ValueError | If the counter has not been started and stopped properly. |
Return the elapsed time in microseconds asynchronously.
| Returns | |
float | Elapsed time in microseconds as a float. |
Return the elapsed time in milliseconds asynchronously.
| Returns | |
float | Elapsed time in milliseconds as a float. |
Restart the performance counter asynchronously.
Resets internal timing attributes and starts the counter again in async mode.
| Returns | |
PerformanceCounter | This instance for method chaining. |
Start the performance counter asynchronously.
Records the current high-resolution time for an asynchronous measurement.
| Returns | |
PerformanceCounter | The current instance for method chaining. |
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 | |
PerformanceCounter | This instance for method chaining. |
| Raises | |
RuntimeError | If called after synchronous start. |
Return the elapsed time in seconds between the last start and stop calls.
| Returns | |
float | Elapsed time in seconds as a float. |
| Raises | |
ValueError | If the counter has not been started and stopped properly. |
Return the elapsed time in microseconds.
Converts the elapsed time in seconds to microseconds.
| Returns | |
float | Elapsed time in microseconds. |
Return the elapsed time in milliseconds.
Converts the elapsed time in seconds to milliseconds.
| Returns | |
float | Elapsed time in milliseconds as a float. |
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 | |
PerformanceCounter | This instance for method chaining. |
Start the performance counter.
Records the current high-resolution time as the start time.
| Returns | |
PerformanceCounter | This 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 | |
PerformanceCounter | The current instance for method chaining. |
| Raises | |
RuntimeError | If called after asynchronous start. |
ValueError | If called before start. |