Written by

Senior Cloud Architect at InterSystems
MOD
Question Eduard Lebedyuk · May 22, 2018

How to get a number of instantiated objects/exceptions

The code I'm researching loosely follows this flow:

  1. My first callback
  2. Black box
  3. My second callback

I can modify 1 and 3 no problem but modifying 2 is difficult.

However I think that step 2 has some optimization problems, namely:

  • instantiates lots of objects
  • throws/catches lots of exceptions (not logged)

Is there a way to count these two metrics?

Comments

Eduard Lebedyuk  May 22, 2018 to Robert Cemper

That's orefs currently in memory.

I need the number of instantiations, preferably by class.

Objects are created and destroyed on a second stage.

0
Robert Cemper  May 22, 2018 to Eduard Lebedyuk

It is not directly what you look for but GlobalReferences are to some extent proportional by some factor to instantiations.
especially if you deduct GlobalReads.
##CLASS(%SYS.ProcessQuery) could be a source for those figures

if you compare it to "normal" code it could be an indicator. 

0