We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47a3f59 commit bd2a4a1Copy full SHA for bd2a4a1
frappe_graphql/__init__.py
@@ -1,24 +1,5 @@
1
# -*- coding: utf-8 -*-
2
from __future__ import unicode_literals
3
-import time
4
-
5
6
-def profile_fn(fn):
7
- from graphql import GraphQLResolveInfo
8
9
- def _inner(*args, **kwargs):
10
- _v = fn.__name__
11
- if len(args) > 1 and isinstance(args[1], GraphQLResolveInfo):
12
- _v += f" df: {args[1].field_name}"
13
14
- t = time.perf_counter()
15
- v = fn(*args, **kwargs)
16
- print(_v, f"{(time.perf_counter() - t) * 1000}ms")
17
- return v
18
19
- return _inner
20
21
22
from .utils.cursor_pagination import CursorPaginator # noqa
23
from .utils.loader import get_schema # noqa
24
from .utils.exceptions import ERROR_CODED_EXCEPTIONS, GQLExecutionUserError, GQLExecutionUserErrorMultiple # noqa
0 commit comments