Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: pkg/analysis_server/tool/spec/generated/java/types/ContextData.java

Issue 1463923003: Rolling average work queue diagnostic (#24933). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: nits Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/tool/spec/generated/java/types/ContextData.java
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ContextData.java b/pkg/analysis_server/tool/spec/generated/java/types/ContextData.java
index ab4020c02af0ceadd7e7048c1f9bbdd354460a06..af83c5e380e94f625b2e7d5dcbcf1b47f39fe8c3 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ContextData.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ContextData.java
@@ -64,6 +64,11 @@ public class ContextData {
private final int workItemQueueLength;
/**
+ * A rolling average of work items in the queue. (A double encoded as a String.)
+ */
+ private final String workItemQueueLengthAverage;
+
+ /**
* Exceptions associated with cache entries.
*/
private final List<String> cacheEntryExceptions;
@@ -71,11 +76,12 @@ public class ContextData {
/**
* Constructor for {@link ContextData}.
*/
- public ContextData(String name, int explicitFileCount, int implicitFileCount, int workItemQueueLength, List<String> cacheEntryExceptions) {
+ public ContextData(String name, int explicitFileCount, int implicitFileCount, int workItemQueueLength, String workItemQueueLengthAverage, List<String> cacheEntryExceptions) {
this.name = name;
this.explicitFileCount = explicitFileCount;
this.implicitFileCount = implicitFileCount;
this.workItemQueueLength = workItemQueueLength;
+ this.workItemQueueLengthAverage = workItemQueueLengthAverage;
this.cacheEntryExceptions = cacheEntryExceptions;
}
@@ -88,6 +94,7 @@ public class ContextData {
other.explicitFileCount == explicitFileCount &&
other.implicitFileCount == implicitFileCount &&
other.workItemQueueLength == workItemQueueLength &&
+ ObjectUtilities.equals(other.workItemQueueLengthAverage, workItemQueueLengthAverage) &&
ObjectUtilities.equals(other.cacheEntryExceptions, cacheEntryExceptions);
}
return false;
@@ -98,8 +105,9 @@ public class ContextData {
int explicitFileCount = jsonObject.get("explicitFileCount").getAsInt();
int implicitFileCount = jsonObject.get("implicitFileCount").getAsInt();
int workItemQueueLength = jsonObject.get("workItemQueueLength").getAsInt();
+ String workItemQueueLengthAverage = jsonObject.get("workItemQueueLengthAverage").getAsString();
List<String> cacheEntryExceptions = JsonUtilities.decodeStringList(jsonObject.get("cacheEntryExceptions").getAsJsonArray());
- return new ContextData(name, explicitFileCount, implicitFileCount, workItemQueueLength, cacheEntryExceptions);
+ return new ContextData(name, explicitFileCount, implicitFileCount, workItemQueueLength, workItemQueueLengthAverage, cacheEntryExceptions);
}
public static List<ContextData> fromJsonArray(JsonArray jsonArray) {
@@ -149,6 +157,13 @@ public class ContextData {
return workItemQueueLength;
}
+ /**
+ * A rolling average of work items in the queue. (A double encoded as a String.)
+ */
+ public String getWorkItemQueueLengthAverage() {
+ return workItemQueueLengthAverage;
+ }
+
@Override
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
@@ -156,6 +171,7 @@ public class ContextData {
builder.append(explicitFileCount);
builder.append(implicitFileCount);
builder.append(workItemQueueLength);
+ builder.append(workItemQueueLengthAverage);
builder.append(cacheEntryExceptions);
return builder.toHashCode();
}
@@ -166,6 +182,7 @@ public class ContextData {
jsonObject.addProperty("explicitFileCount", explicitFileCount);
jsonObject.addProperty("implicitFileCount", implicitFileCount);
jsonObject.addProperty("workItemQueueLength", workItemQueueLength);
+ jsonObject.addProperty("workItemQueueLengthAverage", workItemQueueLengthAverage);
JsonArray jsonArrayCacheEntryExceptions = new JsonArray();
for (String elt : cacheEntryExceptions) {
jsonArrayCacheEntryExceptions.add(new JsonPrimitive(elt));
@@ -186,6 +203,8 @@ public class ContextData {
builder.append(implicitFileCount + ", ");
builder.append("workItemQueueLength=");
builder.append(workItemQueueLength + ", ");
+ builder.append("workItemQueueLengthAverage=");
+ builder.append(workItemQueueLengthAverage + ", ");
builder.append("cacheEntryExceptions=");
builder.append(StringUtils.join(cacheEntryExceptions, ", "));
builder.append("]");
« no previous file with comments | « pkg/analysis_server/test/integration/protocol_matchers.dart ('k') | pkg/analysis_server/tool/spec/spec_input.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698