Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

# Adobe Asset Compute Worker SDK


This library is required for all custom workers for the Adobe Asset Compute Service. It provides an easy to use framework and takes care of common things like asset & rendition access, validation and type checks, event notification, error handling and more.

- [Adobe Asset Compute Worker SDK](#adobe-asset-compute-worker-sdk)
Expand Down
4 changes: 4 additions & 0 deletions lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ class AssetComputeWorker {
if (!process.env.ASSET_COMPUTE_SDK_DISABLE_CGROUP_METRICS) {
this.cgroupSampler = new Sampler(() => {
const metrics_object = cgroupMetrics();
if (metrics_object.memory.containerUsagePercentage > 90) {
console.log(`Container usage: ${metrics_object.memory.containerUsage}`);
console.log(`Container usage percentage: ${metrics_object.memory.containerUsagePercentage}`);
}
const curr_cpu_usage = metrics_object.cpuacct.usage;
delete metrics_object.cpuacct.usage;
delete metrics_object.cpuacct.stat;
Expand Down