Skip to content

Commit

Permalink
calculate IobCobThread execution time
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosKozak committed Oct 28, 2018
1 parent 05dcb58 commit 0034952
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.DecimalFormatter;
import info.nightscout.utils.FabricPrivacy;
import info.nightscout.utils.Profiler;
import info.nightscout.utils.SP;

import static info.nightscout.utils.DateUtil.now;
Expand Down Expand Up @@ -75,6 +76,7 @@ public IobCobOref1Thread(IobCobCalculatorPlugin plugin, String from, long end, b

@Override
public final void run() {
long start = DateUtil.now();
mWakeLock.acquire();
try {
if (L.isEnabled(L.AUTOSENS))
Expand Down Expand Up @@ -395,6 +397,7 @@ public final void run() {
MainApp.bus().post(new EventIobCalculationProgress(""));
if (L.isEnabled(L.AUTOSENS))
log.debug("AUTOSENSDATA thread ended: " + from);
Profiler.log(log, "IobCobOref1Thread", start);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import info.nightscout.utils.DateUtil;
import info.nightscout.utils.DecimalFormatter;
import info.nightscout.utils.FabricPrivacy;
import info.nightscout.utils.Profiler;
import info.nightscout.utils.SP;

import static info.nightscout.utils.DateUtil.now;
Expand Down Expand Up @@ -74,6 +75,7 @@ public IobCobThread(IobCobCalculatorPlugin plugin, String from, long end, boolea

@Override
public final void run() {
long start = DateUtil.now();
mWakeLock.acquire();
try {
if (L.isEnabled(L.AUTOSENS))
Expand Down Expand Up @@ -322,6 +324,7 @@ public final void run() {
MainApp.bus().post(new EventIobCalculationProgress(""));
if (L.isEnabled(L.AUTOSENS))
log.debug("AUTOSENSDATA thread ended: " + from);
Profiler.log(log, "IobCobThread", start);
}
}

Expand Down

0 comments on commit 0034952

Please sign in to comment.