Commit 8e8dd038 by 杨林龙

添加方法运行耗时日志

1 parent a8cffc85
......@@ -64,11 +64,7 @@ public class DeviceServiceImpl implements DeviceService {
@Override
public DeviceDTO getDeviceDTOBySn(String sn) {
StopWatch sw = new StopWatch();
sw.start("getDeviceOrRemote");
Device device = getDeviceOrRemote(sn, false);
sw.stop();
log.info(sw.getLastTaskName() + "耗时:" + sw.getTotalTimeSeconds());
if (device == null) {
return null;
}
......@@ -79,7 +75,11 @@ public class DeviceServiceImpl implements DeviceService {
@Override
public DeviceDTO getDeviceDTOBySn(String sn, Boolean storeIfNotExists) {
StopWatch sw = new StopWatch();
sw.start("getDeviceOrRemote");
Device device = getDeviceOrRemote(sn, storeIfNotExists);
sw.stop();
log.info(sw.getLastTaskName() + "耗时:" + sw.getTotalTimeSeconds());
if (device == null) {
return null;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!