开发者

VisualVM OQL filter not working as expected

开发者 https://www.devze.com 2023-02-11 11:23 出处:网络
I am wondering why the following OQL query is not simply returning the maximum amount of returns: filter(heap.objects(), function(it) {

I am wondering why the following OQL query is not simply returning the maximum amount of returns:

filter(heap.objects(), function(it) {
 return true;
});

In fact, I only get 1 random object returned.

Does this make any sense? My heap has 31.000 objects.

As f开发者_运维百科ar as I know, the above should return ALL objects (or the limit of returns).

My end goal is to be able to loop every object's field to check if it is a float and has a certain value.


My level of humanity once again waisted a lot of time, I forgot to add the select statement:

select filter(heap.objects(), function(it) {
     return true;
    });

Hopefully this will help someone else just as human as me.

0

精彩评论

暂无评论...
验证码 换一张
取 消