visualvm
visualvm copied to clipboard
Provide history of executed OQL queries
I'm always frustrated when I forget to save my OQL queries.
I think that execution history similar to what SQL tools have would be great feature: https://docs.devart.com/studio-for-mysql/writing-and-executing-sql-statements/query-execution-history.html. I would prefer if the history was not limited or if limited then only by disk size. I assume that the history will be relatively small disk size wise.
Nice to have: if I open a heap dump and OQL console, VisualVM would show history of queries that I've executed against that specific heap dump.
Don't run queries in SQL-like form.
Instead use JavaScript engine and comment unused calls. The last un-commented call becomes the result, here I keep the line with PI, other are commented to avoid slowness, except function definition which is almost instant:
function add(a,b) {return a+b;}
// filter(heap.objects("java.lang.ref.SoftReference"),"it.referent != null")
heap.findClass('java.lang.Math').statics.PI
// heap.findClass("java.lang.System").statics