Skip to content

Commit

Permalink
Merge pull request #23 from ZhouYixun/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ZhouYixun authored Oct 7, 2021
2 parents 81142cb + 28c4391 commit 178db74
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ public void getPerform() {
if (!testPackage.equals("")) {
List<String> performanceData = Arrays.asList("memoryinfo", "batteryinfo");
for (String performName : performanceData) {
JSONObject memResult = new JSONObject();
List<List<Object>> re = androidDriver.getPerformanceData(testPackage, performName, 1);
List<Integer> mem;
if (performName.equals("memoryinfo")) {
Expand All @@ -269,8 +268,7 @@ public void getPerform() {
for (Integer memNum : mem) {
perform.put(re.get(0).get(memNum).toString(), re.get(1).get(memNum));
}
memResult.put("data", perform.toJSONString());
log.sendPerLog(testPackage, performName.equals("memoryinfo") ? 1 : 2, memResult);
log.sendPerLog(testPackage, performName.equals("memoryinfo") ? 1 : 2, perform);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/sonic/agent/cv/SIFTFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public FindResult getSIFTFindResult(File temFile, File beforeFile) throws Except
}
}
logger.info("处理后匹配数:" + goodMatches.size());
if (goodMatches.size() == 0) {
if (goodMatches.size() <= 4) {
temFile.delete();
beforeFile.delete();
return null;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/sonic/agent/tests/AndroidTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public void run(Channel channel, long tag, JSONObject jsonObject) throws IOExcep
if (isSupportRecord) {
if (androidStepHandler.getStatus() == 3) {
androidStepHandler.stopRecord(udId);
return;
} else {
androidStepHandler.getAndroidDriver().stopRecordingScreen();
}
Expand All @@ -216,6 +217,7 @@ public void run(Channel channel, long tag, JSONObject jsonObject) throws IOExcep
} catch (FrameRecorder.Exception e) {
e.printStackTrace();
}
return;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/sonic/agent/tools/LogTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void sendPerLog(String packageName, int type, JSONObject detail) {
JSONObject log = new JSONObject();
log.put("msg", "perform");
log.put("des", packageName);
log.put("log", detail);
log.put("log", detail.toJSONString());
log.put("status", type);
send(log);
}
Expand Down

0 comments on commit 178db74

Please sign in to comment.