OQL syntax for counting Strings matching criteria
Asked Answered
C

1

6

Please help me. I analyse my heap dump in VisualVM.

How can I get amount of all Strings with value == "0"? I have the following query:

select count(s) from java.lang.String s where s.toString().equals("0");

But it doesnt work. I want to receive amount of all Strings with "0" value and if it's possible their size in memory.

Cellular answered 5/1, 2015 at 8:39 Comment(0)
C
14

That's solved my problem

select count(heap.objects('java.lang.String'), "it.toString().equals('0')")
Cellular answered 13/1, 2015 at 8:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.