import org.tizen.dynamicanalyzer.swap.model.data.NetworkData;
import org.tizen.dynamicanalyzer.ui.network.data.type.NetworkAPIType;
import org.tizen.dynamicanalyzer.ui.network.data.type.NetworkSeriesType;
+import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager;
import org.tizen.dynamicanalyzer.ui.toolbar.configuration.ConfigurationDialogDataManager;
import org.tizen.dynamicanalyzer.util.DALogger;
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
public void clear() {
addressByFdHashMap.clear();
parentFDByFdHashMap.clear();
+ noDestinationApiSeriesList = new ArrayList<NetworkAPIType>();
+ destinationApiSeriesList = new ArrayList<NetworkAPIType>();
}
public void makeData(List<LogData> inputs) {
}
makeEventData(input);
+ addFailedAPIData(input);
}
if (destinationApiSeriesList.size() > 0) {
}
+ private void addFailedAPIData(NetworkData logs) {
+ if (logs.getErrno() != 0) {
+ SummaryDataManager.getInstance().getFailedApiDataMaker()
+ .makeData(logs);
+ }
+ }
+
private void makeEventData(NetworkData input) {
String apiName = input.getApiName();
apiAddress = parentAddress;
}
- if (filteringFileSocket(apiType, apiAddress)) {
- return;
- }
-
switch (apiType) {
// Socket
case LogCenterConstants.SOCKET_API_FD_OPEN:
}
}
- private boolean filteringFileSocket(int apiType, String ipAddress) {
- if (apiType >= LogCenterConstants.HTTP_API_SESSION_CONSTRUCT) {
- return false;
- }
- if (null == ipAddress) {
- return true;
- }
- String address = ipAddress.trim();
- if (address.equals(CommonConstants.EMPTY)
- || address.startsWith(CommonConstants.SLASH)
- || address.startsWith(CommonConstants.HEX_PREFIX)) {
- return true;
- } else {
- return false;
- }
- }
-
private void setStartSeries(String apiAddress, String apiFD, long time,
int eventType, int apiType, int apiId, int pId) {
}
return retStr;
}
-
- // private String getDowonloadPayloadFilePath(String payload) {
- // if (payload.contains(AnalyzerConstants.CHECK_DOWNLOAD_FILE_STRING)) {
- // String[] strFile = payload
- // .split(AnalyzerConstants.CHECK_DOWNLOAD_FILE_STRING);
- // if (strFile.length < 1) {
- // return payload;
- // }
- // String downloadFilePath = strFile[1];
- //
- // String[] copyFilePathSplit = downloadFilePath.split(File.separator
- // + AnalyzerConstants.TMP_FOLDER + File.separator);
- // if (copyFilePathSplit.length < 1) {
- // return payload;
- // }
- // String downloadFolderPath = File.separator
- // + AnalyzerConstants.DOWNLOAD_FILE_FOLDER;
- //
- // File toDir = new File(AnalyzerManager.getProject().getSavePath()
- // + downloadFolderPath);
- // if (!toDir.exists() || !toDir.isDirectory()) {
- // toDir.mkdirs();
- // }
- //
- // String saveFilePath = downloadFolderPath + File.separator
- // + copyFilePathSplit[1];
- //
- // if (pullPayloadFile(downloadFilePath, AnalyzerManager.getProject()
- // .getSavePath() + saveFilePath)) {
- // return saveFilePath;
- // } else {
- // return payload;
- // }
- // }
- // return payload;
- // }
- //
- // private boolean pullPayloadFile(String from, String to) {
- // SyncResult res = CommunicatorUtils.pull(from, to);
- // if (null != res && res.isOk()) {
- // DALogger.getInstance().debug(from + "file copying success!!");//$NON-NLS-1$
- // } else {
- // DALogger.getInstance().debug("Failed to get " + from); //$NON-NLS-1$
- // return false;
- // }
- // CommunicatorUtils.removeCommand(from);
- // return true;
- // }
}