File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
WordPressUtils/src/main/java/org/wordpress/android/util Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ public static void dump() {
2828 getInstance ().dumpToLog ();
2929 }
3030
31+ public static void stop () {
32+ getInstance ().reset (null );
33+ }
34+
3135 private static ProfilingUtils getInstance () {
3236 if (sInstance == null ) {
3337 sInstance = new ProfilingUtils ();
@@ -56,12 +60,18 @@ public void reset() {
5660 }
5761
5862 public void addSplit (String splitLabel ) {
63+ if (mLabel == null ) {
64+ return ;
65+ }
5966 long now = SystemClock .elapsedRealtime ();
6067 mSplits .add (now );
6168 mSplitLabels .add (splitLabel );
6269 }
6370
6471 public void dumpToLog () {
72+ if (mLabel == null ) {
73+ return ;
74+ }
6575 AppLog .d (T .PROFILING , mLabel + ": begin" );
6676 final long first = mSplits .get (0 );
6777 long now = first ;
You can’t perform that action at this time.
0 commit comments