File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -89,4 +89,4 @@ library from Java for the details.
89
89
jvm-hiccup-meter is distributed under the Eclipse Public License. See
90
90
[ LICENSE] ( LICENSE ) .
91
91
92
- Copyright 2018-2022 Alexander Yakushev
92
+ Copyright 2018-2024 Alexander Yakushev
Original file line number Diff line number Diff line change @@ -109,9 +109,9 @@ private BigInteger allocatedByAllThreads() {
109
109
long [] ids = threadBean .getAllThreadIds ();
110
110
long [] allocatedBytes = threadBean .getThreadAllocatedBytes (ids );
111
111
BigInteger result = BigInteger .ZERO ;
112
- // This is approach is not entirely correct because doesn't see the
112
+ // This approach is not entirely correct because it doesn't see the
113
113
// allocation data from threads that died since the last iteration. Oh
114
- // well, doing best effort.
114
+ // well, just making the best effort.
115
115
for (long abytes : allocatedBytes )
116
116
result = result .add (BigInteger .valueOf (abytes ));
117
117
return result ;
Original file line number Diff line number Diff line change 5
5
(defn start-alloc-rate-meter
6
6
" Start the allocation meter thread. It will measure the heap object allocation
7
7
rate every `interval-ms` (1000 by default) and call `callback-fn` with the
8
- allocation rate in bytes/sec. Note that the rate will not be reported every
9
- `interval-ms` as the iterations that happen accross a GC cycle are discarded .
8
+ allocation rate in bytes/sec. Note that the rate might not be reported every
9
+ `interval-ms` as some iterations may not produce reliable data .
10
10
11
- Returns a nullary function which when called terminates the measuring thread."
11
+ Returns a nullary function which terminates the measuring thread when invoked ."
12
12
[callback-fn & {:keys [interval-ms]}]
13
13
(let [iw (MeterThread. (reify LongConsumer
14
14
(accept [_ v]
You can’t perform that action at this time.
0 commit comments