Answered
manage cpu % during script
hi, it s possible to survey the % cpu during a script? if over xx%, put script in pause?
hi, it s possible to survey the % cpu during a script? if over xx%, put script in pause?
Actually you might check for CPU Usage. Here is a snippet from the IDS SDK but the same method can be found with InDesign Client :
// Get the process cpu usage and vm statistics
this.cpuTime = app.performanceMetric(PerformanceMetricOptions.CPU_TIME);
this.sysCpuTime = app.performanceMetric(PerformanceMetricOptions.OVERALL_SYSTEM_CPU);
this.userCpuTime = app.performanceMetric(PerformanceMetricOptions.OVERALL_USER_CPU);
this.initVMSize = app.performanceMetric(PerformanceMetricOptions.VIRTUAL_MEMORY_SIZE);
this.resMemSize = app.performanceMetric(PerformanceMetricOptions.RESIDENT_MEMORY_SIZE);
But Pausing a script might not be possible. You can exit your script though if you see the CPU go wild.
HTH
Loic
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.