Skip to content

Commit 0f3929b

Browse files
Fix comments and docstrings
1 parent 9902ae6 commit 0f3929b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ library from Java for the details.
8989
jvm-hiccup-meter is distributed under the Eclipse Public License. See
9090
[LICENSE](LICENSE).
9191

92-
Copyright 2018-2022 Alexander Yakushev
92+
Copyright 2018-2024 Alexander Yakushev

src/jvm_alloc_rate_meter/MeterThread.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ private BigInteger allocatedByAllThreads() {
109109
long[] ids = threadBean.getAllThreadIds();
110110
long[] allocatedBytes = threadBean.getThreadAllocatedBytes(ids);
111111
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
113113
// allocation data from threads that died since the last iteration. Oh
114-
// well, doing best effort.
114+
// well, just making the best effort.
115115
for (long abytes : allocatedBytes)
116116
result = result.add(BigInteger.valueOf(abytes));
117117
return result;

src/jvm_alloc_rate_meter/core.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
(defn start-alloc-rate-meter
66
"Start the allocation meter thread. It will measure the heap object allocation
77
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.
1010
11-
Returns a nullary function which when called terminates the measuring thread."
11+
Returns a nullary function which terminates the measuring thread when invoked."
1212
[callback-fn & {:keys [interval-ms]}]
1313
(let [iw (MeterThread. (reify LongConsumer
1414
(accept [_ v]

0 commit comments

Comments
 (0)