fix: breakpad use miniz
Some checks failed
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Successful in 1m34s
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Successful in 2m46s
sm-rpc / build (Debug, host.gcc) (push) Failing after 1m28s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Successful in 2m14s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Successful in 2m8s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Successful in 5m35s
sm-rpc / build (Release, host.gcc) (push) Failing after 1m55s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Successful in 7m21s
Some checks failed
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Successful in 1m34s
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Successful in 2m46s
sm-rpc / build (Debug, host.gcc) (push) Failing after 1m28s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Successful in 2m14s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Successful in 2m8s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Successful in 5m35s
sm-rpc / build (Release, host.gcc) (push) Failing after 1m55s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Successful in 7m21s
This commit is contained in:
3526
third_party/tracy/python/tracy_client/TracyClientBindings.pyi
vendored
Normal file
3526
third_party/tracy/python/tracy_client/TracyClientBindings.pyi
vendored
Normal file
File diff suppressed because one or more lines are too long
3
third_party/tracy/python/tracy_client/__init__.py
vendored
Normal file
3
third_party/tracy/python/tracy_client/__init__.py
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from tracy_client.tracy import *
|
0
third_party/tracy/python/tracy_client/py.typed
vendored
Normal file
0
third_party/tracy/python/tracy_client/py.typed
vendored
Normal file
119
third_party/tracy/python/tracy_client/scoped.py
vendored
Normal file
119
third_party/tracy/python/tracy_client/scoped.py
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
|
||||
from functools import wraps
|
||||
from typing import Callable, Optional, Union
|
||||
|
||||
from tracy_client.TracyClientBindings import (
|
||||
is_enabled,
|
||||
_ScopedZone,
|
||||
ColorType,
|
||||
frame_mark_start,
|
||||
frame_mark_end,
|
||||
)
|
||||
|
||||
Color = Union[int, ColorType]
|
||||
|
||||
|
||||
class ScopedZone(_ScopedZone):
|
||||
def __init__(
|
||||
self,
|
||||
name: Optional[str] = None,
|
||||
color: Color = 0,
|
||||
depth: Optional[int] = None,
|
||||
active: bool = True,
|
||||
) -> None:
|
||||
frame = sys._getframe(1)
|
||||
_ScopedZone.__init__(
|
||||
self,
|
||||
name,
|
||||
int(color),
|
||||
depth,
|
||||
active,
|
||||
frame.f_code.co_name,
|
||||
frame.f_code.co_filename,
|
||||
frame.f_lineno,
|
||||
)
|
||||
|
||||
def color(self, color: Color) -> None:
|
||||
self._color(int(color))
|
||||
|
||||
def __enter__(self):
|
||||
self.enter()
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
self.exit()
|
||||
|
||||
|
||||
def ScopedZoneDecorator(
|
||||
name: Optional[str] = None,
|
||||
color: Color = 0,
|
||||
depth: Optional[int] = None,
|
||||
active: bool = True,
|
||||
class_name: Optional[str] = None,
|
||||
):
|
||||
|
||||
def decorator(function: Callable):
|
||||
if not is_enabled():
|
||||
return function
|
||||
|
||||
source = function.__name__
|
||||
if class_name is not None:
|
||||
source = f"{class_name}:{source}"
|
||||
|
||||
zone = _ScopedZone(
|
||||
name,
|
||||
int(color),
|
||||
depth,
|
||||
active,
|
||||
source,
|
||||
function.__code__.co_filename,
|
||||
function.__code__.co_firstlineno,
|
||||
)
|
||||
|
||||
@wraps(function)
|
||||
def wrapped(*args, **kwargs):
|
||||
zone.enter()
|
||||
value = function(*args, **kwargs)
|
||||
zone.exit()
|
||||
return value
|
||||
|
||||
return wrapped
|
||||
|
||||
return decorator
|
||||
|
||||
|
||||
class ScopedFrame:
|
||||
def __init__(self, name: str) -> None:
|
||||
self.__name = name
|
||||
self.__id: Optional[int] = None
|
||||
|
||||
def __enter__(self):
|
||||
self.__id = frame_mark_start(self.__name)
|
||||
return self
|
||||
|
||||
def __exit__(self, *args):
|
||||
if self.__id is None:
|
||||
return
|
||||
frame_mark_end(self.__id)
|
||||
|
||||
|
||||
def ScopedFrameDecorator(name: str):
|
||||
|
||||
def decorator(function: Callable):
|
||||
if not is_enabled():
|
||||
return function
|
||||
|
||||
@wraps(function)
|
||||
def wrapped(*args, **kwargs):
|
||||
frame_id = frame_mark_start(name)
|
||||
value = function(*args, **kwargs)
|
||||
if frame_id is not None:
|
||||
frame_mark_end(frame_id)
|
||||
return value
|
||||
|
||||
return wrapped
|
||||
|
||||
return decorator
|
36
third_party/tracy/python/tracy_client/tracy.py
vendored
Normal file
36
third_party/tracy/python/tracy_client/tracy.py
vendored
Normal 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))
|
Reference in New Issue
Block a user