-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland "[vm/service] Introduce IsolateGroup entity to vm service api.""
This reverts commit f020ce5 with patchset 1 having original revert, rest - fixes for calling destructors on unlinked IntrusiveDL elements and for assuming int is int64(which breaks down on simarm, ia32 bots). Fixes #38926 Issue #36097 Change-Id: I867526c7de3786806670d1f43dbff07228f80028 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121870 Commit-Queue: Alexander Aprelev <aam@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>
- Loading branch information
Showing
29 changed files
with
937 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'package:test/test.dart'; | ||
import 'package:vm_service/vm_service.dart'; | ||
|
||
import 'common/test_helper.dart'; | ||
|
||
var tests = <VMTest>[ | ||
(VmService service) async { | ||
final vm = await service.getVM(); | ||
final result = | ||
await service.getIsolateGroupMemoryUsage(vm.isolateGroups.first.id); | ||
expect(result.heapUsage, isPositive); | ||
expect(result.heapCapacity, isPositive); | ||
expect(result.externalUsage, isNonNegative); | ||
}, | ||
(VmService service) async { | ||
bool caughtException; | ||
try { | ||
await service.getMemoryUsage('badid'); | ||
fail('Unreachable'); | ||
} on RPCError catch (e) { | ||
caughtException = true; | ||
expect( | ||
e.details, | ||
contains( | ||
"getMemoryUsage: invalid 'isolateGroupId' parameter: badid")); | ||
} | ||
expect(caughtException, isTrue); | ||
}, | ||
]; | ||
|
||
main(args) async => runVMTests(args, tests); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.