diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module
index f8d6ae8..8a94f65 100644
--- a/core/modules/simpletest/simpletest.module
+++ b/core/modules/simpletest/simpletest.module
@@ -184,9 +184,18 @@ function simpletest_run_phpunit_tests($test_id, array $unescaped_test_classnames
   $phpunit_file = simpletest_phpunit_xml_filepath($test_id);
   simpletest_phpunit_run_command($unescaped_test_classnames, $phpunit_file, $status, $output);
 
+  $mem = '0';
+  if (is_array($output) && count($output)) {
+    $mem = array_filter($output, function($v) { return stripos($v, 'Memory: '); });
+    $mem = !empty($mem) ? explode('Memory: ', array_pop($mem)) : '';
+    $mem = !empty($mem) && is_array($mem) ? array_pop($mem) : '0';
+    $mem = trim(str_ireplace('MB', '', $mem));
+    $mem = (int)(floatval($mem)*1048576);
+  }
+
   $rows = [];
   if ($status == TestStatus::PASS) {
-    $rows = simpletest_phpunit_xml_to_rows($test_id, $phpunit_file);
+    $rows = simpletest_phpunit_xml_to_rows($test_id, $phpunit_file, $mem);
   }
   else {
     $rows[] = [
@@ -240,7 +249,7 @@ function simpletest_summarize_phpunit_result($results) {
         '#pass' => 0,
         '#fail' => 0,
         '#exception' => 0,
-        '#debug' => 0,
+        '#debug' => $result['message'],
       );
     }
 
@@ -258,7 +267,7 @@ function simpletest_summarize_phpunit_result($results) {
         break;
 
       case 'debug':
-        $summaries[$result['test_class']]['#debug']++;
+        //$summaries[$result['test_class']]['#debug']++;
         break;
     }
   }
@@ -766,7 +775,7 @@ function simpletest_mail_alter(&$message) {
  *   The results as array of rows in a format that can be inserted into
  *   {simpletest}.
  */
-function simpletest_phpunit_xml_to_rows($test_id, $phpunit_xml_file) {
+function simpletest_phpunit_xml_to_rows($test_id, $phpunit_xml_file, $mem = '0') {
   $contents = @file_get_contents($phpunit_xml_file);
   if (!$contents) {
     return;
@@ -774,7 +783,7 @@ function simpletest_phpunit_xml_to_rows($test_id, $phpunit_xml_file) {
   $records = array();
   $testcases = simpletest_phpunit_find_testcases(new SimpleXMLElement($contents));
   foreach ($testcases as $testcase) {
-    $records[] = simpletest_phpunit_testcase_to_row($test_id, $testcase);
+    $records[] = simpletest_phpunit_testcase_to_row($test_id, $testcase, $mem);
   }
   return $records;
 }
@@ -830,8 +839,8 @@ function simpletest_phpunit_find_testcases(\SimpleXMLElement $element, \SimpleXM
  * @return array
  *   An array containing the {simpletest} result row.
  */
-function simpletest_phpunit_testcase_to_row($test_id, \SimpleXMLElement $testcase) {
-  $message = '';
+function simpletest_phpunit_testcase_to_row($test_id, \SimpleXMLElement $testcase, $mem = '0') {
+  $message = $mem;
   $pass = TRUE;
   if ($testcase->failure) {
     $lines = explode("\n", $testcase->failure);
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 2936723..daf6f36 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -457,6 +457,8 @@ function simpletest_script_init() {
   $_SERVER['HTTP_USER_AGENT'] = 'Drupal command line';
 
   if ($args['concurrency'] > 1) {
+    // increase our chances, we want to get full profile
+    $args['concurrency'] = 8;
     $directory = FileSystem::getOsTemporaryDirectory();
     $test_symlink = @symlink(__FILE__, $directory . '/test_symlink');
     if (!$test_symlink) {
@@ -750,6 +752,7 @@ function simpletest_script_run_one_test($test_id, $test_class) {
       $test->dieOnFail = (bool) $args['die-on-fail'];
       $test->verbose = (bool) $args['verbose'];
       $test->run($methods);
+      $test->results['#debug'] = memory_get_peak_usage(TRUE);
       simpletest_script_reporter_display_summary($test_class, $test->results);
 
       $status = SIMPLETEST_SCRIPT_EXIT_SUCCESS;
