1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Added basic Python Support

Supported:
 - FrameMarks
 - ScopedZones
 - Memory allocations
 - Plots
 - ThreadNames
 - Messages
 - AppConfig

Not supported:
 - GPU
This commit is contained in:
Arnim Balzer
2024-03-17 10:51:38 +00:00
parent ac031e64d6
commit d65d96191a
15 changed files with 5091 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
from typing import Optional, Union
from tracy_client.TracyClientBindings import (
is_enabled,
program_name,
thread_name,
app_info,
ColorType,
PlotFormatType,
frame_mark,
frame_mark_start,
frame_mark_end,
frame_image,
alloc,
free,
message,
plot,
_plot_config,
)
from tracy_client.scoped import (
Color,
ScopedZone,
ScopedFrame,
ScopedZoneDecorator,
ScopedFrameDecorator,
)
PlotType = Union[int, PlotFormatType]
def plot_config(
name: str, type: PlotType, step: bool = False, flip: bool = False, color: Color = 0
) -> Optional[int]:
return _plot_config(name, int(type), step, flip, int(color))