MCPcopy Create free account
hub / github.com/christophhart/HISE / getCpuUsageInPercent

Method getCpuUsageInPercent

hi_scripting/scripting/scriptnode/api/NodeBase.cpp:511–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511String NodeBase::getCpuUsageInPercent() const
512{
513 String s;
514
515 if (lastSpecs.sampleRate > 0.0 && lastSpecs.blockSize > 0)
516 {
517 auto secondPerBuffer = cpuUsage * 0.001;
518 auto bufferDuration = (double)lastSpecs.blockSize / lastSpecs.sampleRate;
519 auto bufferRatio = secondPerBuffer / bufferDuration;
520 s << " - " << String(bufferRatio * 100.0, 1) << "%";
521 }
522
523 return s;
524}
525
526bool NodeBase::isClone() const
527{

Callers 1

paintMethod · 0.80

Calls 1

StringClass · 0.50

Tested by

no test coverage detected