diff --git a/README.md b/README.md index 000d0fa4..75dfef03 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/lib/worker.js b/lib/worker.js index e6d955d2..8fdf6a82 100644 --- a/lib/worker.js +++ b/lib/worker.js @@ -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;