+ this.mainResourceStartIndex + " and " + records.getLength() + ".");
}
private int findMainResourceStartTime() {
for (int i = 0, length = records.getLength(); i < length; ++i) {
JsonObject topLevelRec = records.get(i).asObject();
long type = topLevelRec.get("type").asNumber().getInteger();
if (type == EventRecordType.RESOURCE_SEND_REQUEST) {
JsonObject data = topLevelRec.get("data").asObject();
if (data == JsonValue.NULL) {
throw new AnalyzeException(
"Expected data object in RESOURCE_SEND_REQUEST");
}
JsonValue isMainResource = data.get("isMainResource");
JsonValue identifier = data.get("identifier");
if (isMainResource != null && isMainResource != JsonValue.NULL
&& identifier != null && identifier != JsonValue.NULL) {
this.mainResourceIdentfier = identifier.asNumber().getInteger();
this.mainResourceStartTime = topLevelRec.get("time").asNumber().getDecimal();
// System.out.println("Found: " + data);