| OLD | NEW |
| 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 part of observatory; | 5 part of app; |
| 6 | 6 |
| 7 class CodeInstruction extends Observable { | 7 class CodeInstruction extends Observable { |
| 8 @observable final int address; | 8 @observable final int address; |
| 9 @observable final String machine; | 9 @observable final String machine; |
| 10 @observable final String human; | 10 @observable final String human; |
| 11 @observable int ticks = 0; | 11 @observable int ticks = 0; |
| 12 @observable double percent; | 12 @observable double percent; |
| 13 @observable String formattedTicks() { | 13 @observable String formattedTicks() { |
| 14 if (percent == null || percent <= 0.0) { | 14 if (percent == null || percent <= 0.0) { |
| 15 return ''; | 15 return ''; |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 if (executableLines == 0) { | 383 if (executableLines == 0) { |
| 384 return 0.0; | 384 return 0.0; |
| 385 } | 385 } |
| 386 return (coveredLines / executableLines) * 100.0; | 386 return (coveredLines / executableLines) * 100.0; |
| 387 } | 387 } |
| 388 | 388 |
| 389 @observable String coveredPercentageFormatted() { | 389 @observable String coveredPercentageFormatted() { |
| 390 return '(' + coveredPercentage().toStringAsFixed(1) + '% covered)'; | 390 return '(' + coveredPercentage().toStringAsFixed(1) + '% covered)'; |
| 391 } | 391 } |
| 392 } | 392 } |
| OLD | NEW |