Skip to content
Snippets Groups Projects
Commit 8827b937 authored by Janis Daniel Dähne's avatar Janis Daniel Dähne
Browse files

- we now append the runner debug log into the timings debug log

parent 17157595
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
# variables
//use this to know which version we published
$versionString = '2.6.3';
$versionString = '2.7.0';
$rootDirNameToUseString = 'work';
$isDebug = false; //logs debug to STDOUT
......@@ -63,6 +63,8 @@ $regexMathAllFilesAttribute = '*';
$responseNewLineString = '\r\n'; //to match interface
$runnerNewLineString = "\\r\\n"; //starting with runner version 2.4
$runnerDebugLogNewLineString = "\\n";
# known error codes
$status_code_Ok = 0;
......@@ -151,6 +153,7 @@ $s_timeForUserProgram = 'timeForUserProgram';
$s_output_without_header_part = 'stripedOutput';
$s_characterLimitExceeded = 'characterLimitExceeded';
$s_characterLimitUsed = 'characterLimitUsed';
$s_headerKeyCharacterRunnerDebugLog = 'runnerDebugLog';
$s_header_part_separator = "---\\r\\n";
......
......@@ -11,6 +11,9 @@ function parseHeaderPart($output)
global $s_output_without_header_part;
global $s_characterLimitExceeded;
global $runnerNewLineString;
global $s_headerKeyCharacterRunnerDebugLog;
global $s_timings_string_separator;
//if we have no header tuples we might have only so ---\n
......@@ -24,6 +27,7 @@ function parseHeaderPart($output)
$timeForCompiling = NULL;
$timeForUserProgram = NULL;
$characterLimitExceeded = FALSE;
$runnerDebugLogLines = [];
$headerPartLines = explode($runnerNewLineString, $headerPartText);
......@@ -67,7 +71,25 @@ function parseHeaderPart($output)
$characterLimitExceeded = strtolower($val) === 'true';
} else if (strpos($line, $s_headerKeyCharacterRunnerDebugLog) === 0) {
$val = substr($line, strlen($s_headerKeyCharacterRunnerDebugLog)+1);
if ($val === null) continue;
if (!empty($val)) {
$runnerDebugLogLines = explode($s_timings_string_separator, $val);
addToDebugTimings("--start runner debug lines");
#aadd the runner debug lines to the timings log
foreach ($runnerDebugLogLines as $runnerLogLine) {
addToDebugTimings($runnerLogLine);
}
addToDebugTimings("--finish runner debug lines");
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment