[gardening] Don't attempt to measure RSS under sanitizers or with reload.

Bug: https://github.com/dart-lang/sdk/issues/52816
Change-Id: I4e50180a9285727cc2e275dd17dd6855f21a0b6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311926
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
Ryan Macnak 2023-06-29 19:39:05 +00:00 committed by Commit Queue
parent fc1188d55c
commit 8f21c8ed2a
3 changed files with 16 additions and 12 deletions

View file

@ -9,16 +9,16 @@ import 'dart:io';
import 'package:expect/expect.dart';
void main() async {
final startRss = ProcessInfo.currentRss;
final startRss = ProcessInfo.currentRss; //# measure: ok
for (var i = 0; i < 1024; i++) {
final subscription = Directory.systemTemp.watch().listen((event) {});
await subscription.cancel();
}
final endRss = ProcessInfo.currentRss;
final allocatedBytes = (endRss - startRss);
final limit = 10 * 1024 * 1024;
Expect.isTrue(allocatedBytes < limit,
'expected VM RSS growth to be below ${limit} but got ${allocatedBytes}');
final endRss = ProcessInfo.currentRss; //# measure: continued
final allocatedBytes = (endRss - startRss); //# measure: continued
final limit = 10 * 1024 * 1024; //# measure: continued
Expect.isTrue(allocatedBytes < limit, //# measure: continued
'expected VM RSS growth to be below ${limit} but got ${allocatedBytes}'); //# measure: continued
}

View file

@ -66,6 +66,7 @@ io/socket_close_test: Skip # Timeout
io/socket_many_connections_test: Skip # Timeout
io/web_socket_compression_test: Skip # Timeout
io/web_socket_test: Skip # Timeout
regress_52715_test/measure: Skip # kernel-service interferes with measuring RSS
[ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled ]
io/raw_socket_test: Crash
@ -97,6 +98,9 @@ io/web_socket_test: Skip # Flaky.
map_insert_remove_oom_test: Skip # Heap limit too low.
no_support_debugger_test: Skip # kernel-service snapshot not compatible with flag disabled
[ $builder_tag == asan || $builder_tag == lsan || $builder_tag == msan || $builder_tag == tsan ]
regress_52715_test/measure: Skip # Shadow memory and scudo quarantine interfere with measuring RSS
[ $builder_tag == crossword || $compiler != dartk && $compiler != dartkp || $compiler == dartkp && $system == windows ]
entrypoints_verification_test: SkipByDesign # Requires VM to run. Cannot run in precompiled Windows because the DLL is linked against dart.exe instead of dart_precompiled_runtime.exe. Cannot run in cross-word environment as native extension is not built.

View file

@ -11,16 +11,16 @@ import 'dart:io';
import 'package:expect/expect.dart';
void main() async {
final startRss = ProcessInfo.currentRss;
final startRss = ProcessInfo.currentRss; //# measure: ok
for (var i = 0; i < 1024; i++) {
final subscription = Directory.systemTemp.watch().listen((event) {});
await subscription.cancel();
}
final endRss = ProcessInfo.currentRss;
final allocatedBytes = (endRss - startRss);
final limit = 10 * 1024 * 1024;
Expect.isTrue(allocatedBytes < limit,
'expected VM RSS growth to be below ${limit} but got ${allocatedBytes}');
final endRss = ProcessInfo.currentRss; //# measure: continued
final allocatedBytes = (endRss - startRss); //# measure: continued
final limit = 10 * 1024 * 1024; //# measure: continued
Expect.isTrue(allocatedBytes < limit, //# measure: continued
'expected VM RSS growth to be below ${limit} but got ${allocatedBytes}'); //# measure: continued
}