Skip to content

Commit 14bac8d

Browse files
committed
chore: add debug log to track how long it takes to inject secrets
1 parent 51beb69 commit 14bac8d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Runtime.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ private static function injectSecretEnvironmentVariables(RuntimeContext $context
9191
return;
9292
}
9393

94+
$start = microtime(true);
95+
9496
// Need to pass results through iterator_to_array manually because the collection object
9597
// preserves keys. This causes the next page of results to overwrite the previous page of
9698
// results because they use a numbered index.
@@ -105,5 +107,7 @@ private static function injectSecretEnvironmentVariables(RuntimeContext $context
105107
$context->getLogger()->debug(sprintf('Injecting [%s] secret environment variable into runtime', $name));
106108
$_ENV[$name] = $value;
107109
});
110+
111+
$context->getLogger()->debug(sprintf('Secret environment variables injected in %dms', (microtime(true) - $start) * 1000));
108112
}
109113
}

0 commit comments

Comments
 (0)