[#BloombergLP-bdlmt-ThreadPool-percentBusy]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/ThreadPool.adoc[ThreadPool]::percentBusy
:relfileprefix: ../../../
:mrdocs:

Return the percentage of wall time spent executing jobs&period;

== Synopsis

Declared in `&lt;bdlmt&lowbar;threadpool&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
double
percentBusy() const;
----

== Description

Return the percentage of wall time spent by each thread of this thread pool executing jobs since the last reset time&period; The creation of the thread pool is considered a first reset time&period; This value is calculated as&colon; &grave; sum(jobExecutionTime) 100% P&lowbar;busy &equals; &hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen; x &hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen;&hyphen; timeSinceLastReset maxThreads &grave; Note that this percentage reflects the wall time spent per thread, and not CPU time per thread, or not even CPU time per processor&period; Also note that there is no guarantee that all threads are processed concurrently (e&period;g&period;, the number of threads could be larger than the number of processors)&period;

== Return Value

percentage of wall time spent executing jobs since the last reset


[.small]#Created with https://www.mrdocs.com[MrDocs]#
