From 5eec71f49890a57945d3ab8c46d7d194cb80cd5c Mon Sep 17 00:00:00 2001 From: Matthew Date: Sat, 27 Jul 2024 15:33:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=92=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E7=9A=84=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xypower/mpmaster/AppMaster.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mpmaster/src/main/java/com/xypower/mpmaster/AppMaster.java b/mpmaster/src/main/java/com/xypower/mpmaster/AppMaster.java index e2f30b4a..6c558c02 100644 --- a/mpmaster/src/main/java/com/xypower/mpmaster/AppMaster.java +++ b/mpmaster/src/main/java/com/xypower/mpmaster/AppMaster.java @@ -207,6 +207,8 @@ public class AppMaster { long startTime = now.getTime() / 1000; long endTime = startTime + 86400 - 1; + String startTimeStr = Integer.toString(now.getYear()) + (now.getMonth() < 10 ? "0" : "") + Integer.toString(now.getMonth()) + (now.getDate() < 10 ? "0" : "") + Integer.toString(now.getDate()); + try { if (masterUrl.indexOf('?') != -1) { masterUrl += "&" + MicroPhotoContext.MASTER_URL_CMDID + "=" + URLEncoder.encode(mCmdid, "UTF-8"); @@ -221,6 +223,7 @@ public class AppMaster { if (mBundleWithMpApp) { postParams.add(new Pair("bundled", "1")); } + postParams.add(new Pair("reportTime", Long.toString(startTime))); postParams.add(new Pair("bootTime", Long.toString(getBootTime()))); postParams.add(new Pair("i1Version", mService.getMpAppVersion())); postParams.add(new Pair("oid", mService.getSerialNo())); @@ -328,6 +331,8 @@ public class AppMaster { private void buildStats(long startTime, List> stats) { + mService.logger.info("Build Stats: " + Long.toString(startTime)); + try { /* struct MP_STATS @@ -356,10 +361,15 @@ public class AppMaster { return; } + String msg = " hb=" + Integer.toString(items[0]) + "/" + Integer.toString(items[1]) + + " photos=" + Integer.toString(items[2]) + "/" + Integer.toString(items[3]) + "/" + Integer.toString(items[7]); + + mService.logger.info("Build Stats: " + Long.toString(startTime) + msg); + stats.add(new Pair("numberOfHb", Integer.toString(items[0]))); stats.add(new Pair("numberOfHbAck", Integer.toString(items[1]))); - stats.add(new Pair("recv", Integer.toString(items[2]))); + stats.add(new Pair("scheduled", Integer.toString(items[2]))); stats.add(new Pair("photoTimes", Integer.toString(items[3]))); stats.add(new Pair("success", Integer.toString(items[4]))); stats.add(new Pair("failure", Integer.toString(items[5])));