mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 11:59:00 +00:00
GitHub actions
This commit is contained in:
@@ -41,12 +41,15 @@ const JS_DIR = path.join(CMAKE_BUILD_ROOT, "js");
|
||||
const t = new Bun.Transpiler({ loader: "tsx" });
|
||||
|
||||
let start = performance.now();
|
||||
function mark(log: string) {
|
||||
const silent = process.env.BUN_SILENT === "1";
|
||||
function markVerbose(log: string) {
|
||||
const now = performance.now();
|
||||
console.log(`${log} (${(now - start).toFixed(0)}ms)`);
|
||||
start = now;
|
||||
}
|
||||
|
||||
const mark = silent ? (log: string) => {} : markVerbose;
|
||||
|
||||
const { moduleList, nativeModuleIds, nativeModuleEnumToId, nativeModuleEnums, requireTransformer } =
|
||||
createInternalModuleRegistry(BASE);
|
||||
globalThis.requireTransformer = requireTransformer;
|
||||
@@ -431,19 +434,21 @@ writeIfNotChanged(js2nativeZigPath, getJS2NativeZig(js2nativeZigPath));
|
||||
|
||||
mark("Generate Code");
|
||||
|
||||
console.log("");
|
||||
console.timeEnd(timeString);
|
||||
console.log(
|
||||
` %s kb`,
|
||||
Math.floor(
|
||||
(moduleList.reduce((a, b) => a + outputs.get(b.slice(0, -3).replaceAll("/", path.sep)).length, 0) +
|
||||
globalThis.internalFunctionJSSize) /
|
||||
1000,
|
||||
),
|
||||
);
|
||||
console.log(` %s internal modules`, moduleList.length);
|
||||
console.log(
|
||||
` %s internal functions across %s files`,
|
||||
globalThis.internalFunctionCount,
|
||||
globalThis.internalFunctionFileCount,
|
||||
);
|
||||
if (!silent) {
|
||||
console.log("");
|
||||
console.timeEnd(timeString);
|
||||
console.log(
|
||||
` %s kb`,
|
||||
Math.floor(
|
||||
(moduleList.reduce((a, b) => a + outputs.get(b.slice(0, -3).replaceAll("/", path.sep)).length, 0) +
|
||||
globalThis.internalFunctionJSSize) /
|
||||
1000,
|
||||
),
|
||||
);
|
||||
console.log(` %s internal modules`, moduleList.length);
|
||||
console.log(
|
||||
` %s internal functions across %s files`,
|
||||
globalThis.internalFunctionCount,
|
||||
globalThis.internalFunctionFileCount,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user