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

Side by Side Diff: pkg/analysis_server/lib/plugin/protocol/generated_protocol.dart

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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/domain_diagnostic.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script 6 // To regenerate the file, use the script
7 // "pkg/analysis_server/tool/spec/generate_files". 7 // "pkg/analysis_server/tool/spec/generate_files".
8 8
9 part of analysis_server.plugin.protocol.protocol; 9 part of analysis_server.plugin.protocol.protocol;
10 10
(...skipping 9259 matching lines...) Expand 10 before | Expand all | Expand 10 after
9270 } 9270 }
9271 9271
9272 /** 9272 /**
9273 * ContextData 9273 * ContextData
9274 * 9274 *
9275 * { 9275 * {
9276 * "name": String 9276 * "name": String
9277 * "explicitFileCount": int 9277 * "explicitFileCount": int
9278 * "implicitFileCount": int 9278 * "implicitFileCount": int
9279 * "workItemQueueLength": int 9279 * "workItemQueueLength": int
9280 * "workItemQueueLengthAverage": String
9280 * "cacheEntryExceptions": List<String> 9281 * "cacheEntryExceptions": List<String>
9281 * } 9282 * }
9282 * 9283 *
9283 * Clients may not extend, implement or mix-in this class. 9284 * Clients may not extend, implement or mix-in this class.
9284 */ 9285 */
9285 class ContextData implements HasToJson { 9286 class ContextData implements HasToJson {
9286 String _name; 9287 String _name;
9287 9288
9288 int _explicitFileCount; 9289 int _explicitFileCount;
9289 9290
9290 int _implicitFileCount; 9291 int _implicitFileCount;
9291 9292
9292 int _workItemQueueLength; 9293 int _workItemQueueLength;
9293 9294
9295 String _workItemQueueLengthAverage;
9296
9294 List<String> _cacheEntryExceptions; 9297 List<String> _cacheEntryExceptions;
9295 9298
9296 /** 9299 /**
9297 * The name of the context. 9300 * The name of the context.
9298 */ 9301 */
9299 String get name => _name; 9302 String get name => _name;
9300 9303
9301 /** 9304 /**
9302 * The name of the context. 9305 * The name of the context.
9303 */ 9306 */
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
9339 9342
9340 /** 9343 /**
9341 * The number of work items in the queue. 9344 * The number of work items in the queue.
9342 */ 9345 */
9343 void set workItemQueueLength(int value) { 9346 void set workItemQueueLength(int value) {
9344 assert(value != null); 9347 assert(value != null);
9345 this._workItemQueueLength = value; 9348 this._workItemQueueLength = value;
9346 } 9349 }
9347 9350
9348 /** 9351 /**
9352 * A rolling average of work items in the queue. (A double encoded as a
9353 * String.)
9354 */
9355 String get workItemQueueLengthAverage => _workItemQueueLengthAverage;
9356
9357 /**
9358 * A rolling average of work items in the queue. (A double encoded as a
9359 * String.)
9360 */
9361 void set workItemQueueLengthAverage(String value) {
9362 assert(value != null);
9363 this._workItemQueueLengthAverage = value;
9364 }
9365
9366 /**
9349 * Exceptions associated with cache entries. 9367 * Exceptions associated with cache entries.
9350 */ 9368 */
9351 List<String> get cacheEntryExceptions => _cacheEntryExceptions; 9369 List<String> get cacheEntryExceptions => _cacheEntryExceptions;
9352 9370
9353 /** 9371 /**
9354 * Exceptions associated with cache entries. 9372 * Exceptions associated with cache entries.
9355 */ 9373 */
9356 void set cacheEntryExceptions(List<String> value) { 9374 void set cacheEntryExceptions(List<String> value) {
9357 assert(value != null); 9375 assert(value != null);
9358 this._cacheEntryExceptions = value; 9376 this._cacheEntryExceptions = value;
9359 } 9377 }
9360 9378
9361 ContextData(String name, int explicitFileCount, int implicitFileCount, int wor kItemQueueLength, List<String> cacheEntryExceptions) { 9379 ContextData(String name, int explicitFileCount, int implicitFileCount, int wor kItemQueueLength, String workItemQueueLengthAverage, List<String> cacheEntryExce ptions) {
9362 this.name = name; 9380 this.name = name;
9363 this.explicitFileCount = explicitFileCount; 9381 this.explicitFileCount = explicitFileCount;
9364 this.implicitFileCount = implicitFileCount; 9382 this.implicitFileCount = implicitFileCount;
9365 this.workItemQueueLength = workItemQueueLength; 9383 this.workItemQueueLength = workItemQueueLength;
9384 this.workItemQueueLengthAverage = workItemQueueLengthAverage;
9366 this.cacheEntryExceptions = cacheEntryExceptions; 9385 this.cacheEntryExceptions = cacheEntryExceptions;
9367 } 9386 }
9368 9387
9369 factory ContextData.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) { 9388 factory ContextData.fromJson(JsonDecoder jsonDecoder, String jsonPath, Object json) {
9370 if (json == null) { 9389 if (json == null) {
9371 json = {}; 9390 json = {};
9372 } 9391 }
9373 if (json is Map) { 9392 if (json is Map) {
9374 String name; 9393 String name;
9375 if (json.containsKey("name")) { 9394 if (json.containsKey("name")) {
(...skipping 12 matching lines...) Expand all
9388 implicitFileCount = jsonDecoder.decodeInt(jsonPath + ".implicitFileCount ", json["implicitFileCount"]); 9407 implicitFileCount = jsonDecoder.decodeInt(jsonPath + ".implicitFileCount ", json["implicitFileCount"]);
9389 } else { 9408 } else {
9390 throw jsonDecoder.missingKey(jsonPath, "implicitFileCount"); 9409 throw jsonDecoder.missingKey(jsonPath, "implicitFileCount");
9391 } 9410 }
9392 int workItemQueueLength; 9411 int workItemQueueLength;
9393 if (json.containsKey("workItemQueueLength")) { 9412 if (json.containsKey("workItemQueueLength")) {
9394 workItemQueueLength = jsonDecoder.decodeInt(jsonPath + ".workItemQueueLe ngth", json["workItemQueueLength"]); 9413 workItemQueueLength = jsonDecoder.decodeInt(jsonPath + ".workItemQueueLe ngth", json["workItemQueueLength"]);
9395 } else { 9414 } else {
9396 throw jsonDecoder.missingKey(jsonPath, "workItemQueueLength"); 9415 throw jsonDecoder.missingKey(jsonPath, "workItemQueueLength");
9397 } 9416 }
9417 String workItemQueueLengthAverage;
9418 if (json.containsKey("workItemQueueLengthAverage")) {
9419 workItemQueueLengthAverage = jsonDecoder.decodeString(jsonPath + ".workI temQueueLengthAverage", json["workItemQueueLengthAverage"]);
9420 } else {
9421 throw jsonDecoder.missingKey(jsonPath, "workItemQueueLengthAverage");
9422 }
9398 List<String> cacheEntryExceptions; 9423 List<String> cacheEntryExceptions;
9399 if (json.containsKey("cacheEntryExceptions")) { 9424 if (json.containsKey("cacheEntryExceptions")) {
9400 cacheEntryExceptions = jsonDecoder.decodeList(jsonPath + ".cacheEntryExc eptions", json["cacheEntryExceptions"], jsonDecoder.decodeString); 9425 cacheEntryExceptions = jsonDecoder.decodeList(jsonPath + ".cacheEntryExc eptions", json["cacheEntryExceptions"], jsonDecoder.decodeString);
9401 } else { 9426 } else {
9402 throw jsonDecoder.missingKey(jsonPath, "cacheEntryExceptions"); 9427 throw jsonDecoder.missingKey(jsonPath, "cacheEntryExceptions");
9403 } 9428 }
9404 return new ContextData(name, explicitFileCount, implicitFileCount, workIte mQueueLength, cacheEntryExceptions); 9429 return new ContextData(name, explicitFileCount, implicitFileCount, workIte mQueueLength, workItemQueueLengthAverage, cacheEntryExceptions);
9405 } else { 9430 } else {
9406 throw jsonDecoder.mismatch(jsonPath, "ContextData", json); 9431 throw jsonDecoder.mismatch(jsonPath, "ContextData", json);
9407 } 9432 }
9408 } 9433 }
9409 9434
9410 Map<String, dynamic> toJson() { 9435 Map<String, dynamic> toJson() {
9411 Map<String, dynamic> result = {}; 9436 Map<String, dynamic> result = {};
9412 result["name"] = name; 9437 result["name"] = name;
9413 result["explicitFileCount"] = explicitFileCount; 9438 result["explicitFileCount"] = explicitFileCount;
9414 result["implicitFileCount"] = implicitFileCount; 9439 result["implicitFileCount"] = implicitFileCount;
9415 result["workItemQueueLength"] = workItemQueueLength; 9440 result["workItemQueueLength"] = workItemQueueLength;
9441 result["workItemQueueLengthAverage"] = workItemQueueLengthAverage;
9416 result["cacheEntryExceptions"] = cacheEntryExceptions; 9442 result["cacheEntryExceptions"] = cacheEntryExceptions;
9417 return result; 9443 return result;
9418 } 9444 }
9419 9445
9420 @override 9446 @override
9421 String toString() => JSON.encode(toJson()); 9447 String toString() => JSON.encode(toJson());
9422 9448
9423 @override 9449 @override
9424 bool operator==(other) { 9450 bool operator==(other) {
9425 if (other is ContextData) { 9451 if (other is ContextData) {
9426 return name == other.name && 9452 return name == other.name &&
9427 explicitFileCount == other.explicitFileCount && 9453 explicitFileCount == other.explicitFileCount &&
9428 implicitFileCount == other.implicitFileCount && 9454 implicitFileCount == other.implicitFileCount &&
9429 workItemQueueLength == other.workItemQueueLength && 9455 workItemQueueLength == other.workItemQueueLength &&
9456 workItemQueueLengthAverage == other.workItemQueueLengthAverage &&
9430 listEqual(cacheEntryExceptions, other.cacheEntryExceptions, (String a, String b) => a == b); 9457 listEqual(cacheEntryExceptions, other.cacheEntryExceptions, (String a, String b) => a == b);
9431 } 9458 }
9432 return false; 9459 return false;
9433 } 9460 }
9434 9461
9435 @override 9462 @override
9436 int get hashCode { 9463 int get hashCode {
9437 int hash = 0; 9464 int hash = 0;
9438 hash = JenkinsSmiHash.combine(hash, name.hashCode); 9465 hash = JenkinsSmiHash.combine(hash, name.hashCode);
9439 hash = JenkinsSmiHash.combine(hash, explicitFileCount.hashCode); 9466 hash = JenkinsSmiHash.combine(hash, explicitFileCount.hashCode);
9440 hash = JenkinsSmiHash.combine(hash, implicitFileCount.hashCode); 9467 hash = JenkinsSmiHash.combine(hash, implicitFileCount.hashCode);
9441 hash = JenkinsSmiHash.combine(hash, workItemQueueLength.hashCode); 9468 hash = JenkinsSmiHash.combine(hash, workItemQueueLength.hashCode);
9469 hash = JenkinsSmiHash.combine(hash, workItemQueueLengthAverage.hashCode);
9442 hash = JenkinsSmiHash.combine(hash, cacheEntryExceptions.hashCode); 9470 hash = JenkinsSmiHash.combine(hash, cacheEntryExceptions.hashCode);
9443 return JenkinsSmiHash.finish(hash); 9471 return JenkinsSmiHash.finish(hash);
9444 } 9472 }
9445 } 9473 }
9446 9474
9447 /** 9475 /**
9448 * Element 9476 * Element
9449 * 9477 *
9450 * { 9478 * {
9451 * "kind": ElementKind 9479 * "kind": ElementKind
(...skipping 7248 matching lines...) Expand 10 before | Expand all | Expand 10 after
16700 return false; 16728 return false;
16701 } 16729 }
16702 16730
16703 @override 16731 @override
16704 int get hashCode { 16732 int get hashCode {
16705 int hash = 0; 16733 int hash = 0;
16706 hash = JenkinsSmiHash.combine(hash, newName.hashCode); 16734 hash = JenkinsSmiHash.combine(hash, newName.hashCode);
16707 return JenkinsSmiHash.finish(hash); 16735 return JenkinsSmiHash.finish(hash);
16708 } 16736 }
16709 } 16737 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/domain_diagnostic.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698