From 9df6003482a0f846e159ebac7a402663c455bedd Mon Sep 17 00:00:00 2001 From: vakrilov Date: Sun, 14 May 2017 11:03:57 +0300 Subject: [PATCH] Add class name in timer name --- tests/app/ui/border/border-tests.ts | 4 +++- tns-core-modules/profiling/profiling.ts | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/app/ui/border/border-tests.ts b/tests/app/ui/border/border-tests.ts index 1425ebd4f..3d03ad2c4 100644 --- a/tests/app/ui/border/border-tests.ts +++ b/tests/app/ui/border/border-tests.ts @@ -2,4 +2,6 @@ import { Border } from "tns-core-modules/ui/border"; // << border-require -console.dir(Border); \ No newline at end of file +if (Border) { + // NOOP +} \ No newline at end of file diff --git a/tns-core-modules/profiling/profiling.ts b/tns-core-modules/profiling/profiling.ts index f6ea21c4f..75432bc8f 100644 --- a/tns-core-modules/profiling/profiling.ts +++ b/tns-core-modules/profiling/profiling.ts @@ -129,7 +129,12 @@ export function profile(name?: string): MethodDecorator { var originalMethod = descriptor.value; if (!name) { - name = key; + let className = ""; + if (target && target.constructor && target.constructor.name) { + className = target.constructor.name + "."; + } + + name = className + key; } profileNames.push(name);