Skip to content

Commit 38c680b

Browse files
committed
Merge branch 'develop' into feature/site-settings-review
Conflicts: WordPress/src/main/java/org/wordpress/android/ui/prefs/BlogPreferencesActivity.java WordPress/src/main/res/values/styles_calypso.xml
2 parents 83d1764 + 696c325 commit 38c680b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

WordPressUtils/src/main/java/org/wordpress/android/util/ProfilingUtils.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)