Skip to content

Commit bd2a4a1

Browse files
committed
fix: removed unused code
1 parent 47a3f59 commit bd2a4a1

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

frappe_graphql/__init__.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
# -*- coding: utf-8 -*-
22
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-
223
from .utils.cursor_pagination import CursorPaginator # noqa
234
from .utils.loader import get_schema # noqa
245
from .utils.exceptions import ERROR_CODED_EXCEPTIONS, GQLExecutionUserError, GQLExecutionUserErrorMultiple # noqa

0 commit comments

Comments
 (0)