File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1895,8 +1895,19 @@ func HandleSummaryPacket(packet []byte) error {
18951895 incBy = 0
18961896 }
18971897 ThreadCreations .Add (incBy )
1898- ThreadDestructions .Add (float64 (stat .ThreadDestructions - lastStats .ThreadDestructions ))
1899- ThreadLimitReached .Add (float64 (stat .ThreadLimitReached - lastStats .ThreadLimitReached ))
1898+
1899+ incBy = float64 (stat .ThreadDestructions - lastStats .ThreadDestructions )
1900+ if stat .ThreadDestructions < lastStats .ThreadDestructions {
1901+ incBy = 0
1902+ }
1903+ ThreadDestructions .Add (incBy )
1904+
1905+ incBy = float64 (stat .ThreadLimitReached - lastStats .ThreadLimitReached )
1906+ if stat .ThreadLimitReached < lastStats .ThreadLimitReached {
1907+ incBy = 0
1908+ }
1909+ ThreadLimitReached .Add (incBy )
1910+
19001911 lastStats .ThreadCreations = stat .ThreadCreations
19011912 lastStats .ThreadDestructions = stat .ThreadDestructions
19021913 lastStats .ThreadLimitReached = stat .ThreadLimitReached
You can’t perform that action at this time.
0 commit comments