@hyperframes/aws-lambda 0.8.206 → 0.8.207

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -689,7 +689,9 @@ async function handleRenderChunk(event, deps) {
689
689
  const started = Date.now();
690
690
  const s3 = deps?.s3 ?? getS3Client();
691
691
  const primitive = deps?.primitives?.renderChunk ?? renderChunk;
692
+ const chromeStarted = Date.now();
692
693
  await ensureChromePath(deps);
694
+ const chromeMs = Date.now() - chromeStarted;
693
695
  const work = mkdtempSync2(join2(deps?.tmpRoot ?? tmpdir2(), "hf-lambda-chunk-"));
694
696
  const planTar = join2(work, "plan.tar.gz");
695
697
  const planDir = join2(work, "plan");
@@ -701,6 +703,7 @@ async function handleRenderChunk(event, deps) {
701
703
  work,
702
704
  event.Format === "png-sequence" ? `chunk-${pad(event.ChunkIndex)}` : `chunk-${pad(event.ChunkIndex)}${formatExtension(event.Format)}`
703
705
  );
706
+ const primitiveStarted = Date.now();
704
707
  const result = await primitive(planDir, event.ChunkIndex, chunkOutputBase, {
705
708
  maxCaptureWorkers: lambdaMaxCaptureWorkers(),
706
709
  interleaveCapture: true
@@ -709,7 +712,8 @@ async function handleRenderChunk(event, deps) {
709
712
  event: "chunk_capture",
710
713
  chunkIndex: event.ChunkIndex,
711
714
  workers: result.workers,
712
- captureMode: result.captureMode
715
+ captureMode: result.captureMode,
716
+ ...chunkStageTimings(result, primitiveStarted - started, chromeMs)
713
717
  });
714
718
  const chunkUri = await uploadChunkOutput(
715
719
  s3,
@@ -734,7 +738,9 @@ async function handleRenderChunkV2(event, deps) {
734
738
  const started = Date.now();
735
739
  const s3 = deps?.s3 ?? getS3Client();
736
740
  const primitive = deps?.primitives?.renderChunk ?? renderChunk;
741
+ const chromeStarted = Date.now();
737
742
  await ensureChromePath(deps);
743
+ const chromeMs = Date.now() - chromeStarted;
738
744
  const work = mkdtempSync2(join2(deps?.tmpRoot ?? tmpdir2(), "hf-lambda-chunk-v2-"));
739
745
  try {
740
746
  const { planDir } = await downloadAndMaterializePlanV2(
@@ -747,6 +753,7 @@ async function handleRenderChunkV2(event, deps) {
747
753
  work,
748
754
  event.Format === "png-sequence" ? `chunk-${pad(event.ChunkIndex)}` : `chunk-${pad(event.ChunkIndex)}${formatExtension(event.Format)}`
749
755
  );
756
+ const primitiveStarted = Date.now();
750
757
  const result = await primitive(planDir, event.ChunkIndex, chunkOutputBase, {
751
758
  maxCaptureWorkers: lambdaMaxCaptureWorkers(),
752
759
  interleaveCapture: true
@@ -755,7 +762,8 @@ async function handleRenderChunkV2(event, deps) {
755
762
  event: "chunk_capture",
756
763
  chunkIndex: event.ChunkIndex,
757
764
  workers: result.workers,
758
- captureMode: result.captureMode
765
+ captureMode: result.captureMode,
766
+ ...chunkStageTimings(result, primitiveStarted - started, chromeMs)
759
767
  });
760
768
  const chunkUri = await uploadChunkOutput(
761
769
  s3,
@@ -776,6 +784,18 @@ async function handleRenderChunkV2(event, deps) {
776
784
  cleanupDir(work);
777
785
  }
778
786
  }
787
+ function chunkStageTimings(result, setupMs, chromeMs) {
788
+ const { planHashMs, sessionBootMs, captureStageMs, encodeStageMs, durationMs } = result;
789
+ return {
790
+ setupMs,
791
+ chromeMs,
792
+ planHashMs,
793
+ sessionBootMs,
794
+ captureStageMs,
795
+ encodeStageMs,
796
+ durationMs
797
+ };
798
+ }
779
799
  async function uploadChunkOutput(s3, result, prefix, chunkIndex) {
780
800
  const trimmed = trimTrailingSlash2(prefix);
781
801
  if (result.outputKind === "file") {
package/dist/handler.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  handler,
3
3
  unwrapEvent
4
- } from "./_chunks/chunk-7UT4D5TW.js";
4
+ } from "./_chunks/chunk-OTRGQBLD.js";
5
5
  import "./_chunks/chunk-6TIVMKTV.js";
6
6
  import "./_chunks/chunk-4CK3RKM2.js";
7
7
  export {
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  resolveChromeExecutablePath,
7
7
  resolveChromeSource,
8
8
  unwrapEvent
9
- } from "./_chunks/chunk-7UT4D5TW.js";
9
+ } from "./_chunks/chunk-OTRGQBLD.js";
10
10
  import {
11
11
  InvalidConfigError,
12
12
  computeRenderCost,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/aws-lambda",
3
- "version": "0.8.206",
3
+ "version": "0.8.207",
4
4
  "description": "AWS Lambda adapter for HyperFrames distributed rendering — handler, client-side SDK, and CDK construct.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,7 +52,7 @@
52
52
  "ffprobe-static": "^3.1.0",
53
53
  "puppeteer-core": "^25.8.0",
54
54
  "tar": "^7.4.3",
55
- "@hyperframes/producer": "^0.8.206"
55
+ "@hyperframes/producer": "^0.8.207"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/aws-lambda": "^8.10.146",
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.8.206",
3
- "url": "https://github.com/heygen-com/hyperframes/releases/download/v0.8.206/hyperframes-lambda-handler.zip",
4
- "sha256": "c3783aafdd153394eabe73b89ac063a6dd537afef2de78f92ccbcbba8bef7ffa",
5
- "bytes": 129287928
2
+ "version": "0.8.207",
3
+ "url": "https://github.com/heygen-com/hyperframes/releases/download/v0.8.207/hyperframes-lambda-handler.zip",
4
+ "sha256": "dd650adab15d012e9dadbce72b116409296b7ade4dfa39745786419025121eab",
5
+ "bytes": 129292903
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.8.206",
3
- "url": "https://github.com/heygen-com/hyperframes/releases/download/v0.8.206/hyperframes-lambda-video-arm64.oci.tar",
4
- "sha256": "9af416058b676bb8c3563bb61ad128f21eb473f974f76904d2bd238ad0bec023",
5
- "bytes": 244666368
2
+ "version": "0.8.207",
3
+ "url": "https://github.com/heygen-com/hyperframes/releases/download/v0.8.207/hyperframes-lambda-video-arm64.oci.tar",
4
+ "sha256": "eb2fade842a4f1c31389682ddfdf1aa05091dba8ea072f5d2abf88814edab0b7",
5
+ "bytes": 244668928
6
6
  }