Warning: session_start(): open(/var/lib/php/sessions/sess_fpq4uq16bn65lgo8kkbaa23tkt, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
sS transpilerID = /*#1025804;*/ #759;
p {
int runs = 8; // 8 are enough for warm-up with this big source
bool mediumTranspile = !cic(args, "quick");
S snippetID = or2(first(args), #1016478); // transpile the OS by default
S mainJava =
//[[print("hello!");]];
//loadSnippet(#759); // doesn't work, requires different transpiler
loadSnippet(snippetID);
mainJava = dropTranslators(mainJava);
S transpiled, transpiled2;
new L times;
bool resultsDiffer;
maximizeConsole();
O transpiler = hotwireDependent(transpilerID);
setAll(transpiler,
/*useIndexedList2 := false, useTokenIndexedList := true,*/
dontLoadCachedIncludesFromVM := true,
//cacheStdFunctions := false,
//cacheStdClasses := false
);
time "First run" {
set(transpiler, +mainJava);
callMain(transpiler);
transpiled = (S) get(transpiler, 'mainJava);
}
long time1 = lastTiming();
// Now we should have cached all the snippets, but not the pre-transpiled stuff.
for (int run = 2; run <= runs; run++) {
S msg = "Run " + run;
if (run == runs) poorMansProfiling();
time msg {
if (mediumTranspile)
call(transpiler, 'forgetCachedIncludes);
set(transpiler, +mainJava);
callMain(transpiler);
transpiled2 = (S) get(transpiler, 'mainJava);
}
times.add(lastTiming());
S check1 = minusLinesContaining("myTranspilationDate_value", transpiled);
S check2 = minusLinesContaining("myTranspilationDate_value", transpiled2);
if (neq(check1, check2)) {
set resultsDiffer;
print("WARNING: RESULTS DIFFER");
print(unidiff(check1, check2));
}
}
poorMansProfiling_stopAndPrintResults();
print("Made " + nChars(transpiled) + ", md5: " + md5(transpiled));
print("Run 1 with downloads: " + time1 + " ms");
int run = 2;
for (long time : times)
print("Run " + (run++) + " w/o downloads: " + time + " ms");
if (resultsDiffer)
print("WARNING: RESULTS DIFFER BETWEEN RUNS");
}