Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

488 B
Raw Blame
// Bench-side lines for the write trace (HF_WRITE_TRACE), in the same file as the server's.
import { appendFileSync } from "node:fs";
import { createHash } from "node:crypto";

export const traceBench = (kind, data = {}) => {
  if (process.env.HF_WRITE_TRACE)
    appendFileSync(
      process.env.HF_WRITE_TRACE,
      JSON.stringify({ t: Date.now(), kind, ...data }) + "\n",
    );
};
export const hashOf = (text) => createHash("sha256").update(String(text)).digest("hex").slice(0, 8);