Close
Tutorials    
Snapshot   
Tips & Tricks

Profilers

Hyperon Runtime gives you built-in profilers, which you can use to figure out hot spots or verify your assumptions. You are able to use 4 types of profiles:

  • SQL profiler
  • Parameter usage profiler
  • Function usage profiler
  • Domain attribute usage profiler

SQL profiler

JdbcProfiler is responsible for collecting SQL query statistics. It provides the following details:

  • totalTime = total time in milliseconds
  • count = number of times given SQL was invoked
  • sql = SQL query that was invoked

Hyperon Runtime

JDBC query statistics in Hyperon Runtime can be fetched by using the pl.decerto.hyperon.runtime.profiler.jdbc.JdbcProfiler class. To get statistics just invoke getQueryStats() method, as shown below:

JdbcProfiler profiler = JdbcProfiler.getSingleton();
List<QueryStat> queryStats = profiler.getQueryStats();
//do something with fetched stats

To reset load stats, invoke clear() method as shown below:

JdbcProfiler.getSingleton().clear()

Hyperon Runtime-REST

To see all JDBC query statistics in Hyperon Runtime-REST, go to https://<your_hyperon_runtime_rest_url>/api/profiler/jdbc.

Hyperon Studio

SQL profiler is available also in Hyperon Studio. To see all statistics, go to https://<your_hyperon_studio_url>/profiler

For example:

if Hyperon Studio is available via url: https://hyperon_demo.com/hyperon/app ,

profiler's page is available via url https://hyperon_demo.com/hyperon/profiler .

To log into profiler's page use Hyperon Studio credentials.

IMPORTANT:
Statistics shown in Hyperon Studio profiler are not your application statistics! These are statistics from Hyperon Studio, for example from Hyperon Tester invocations.

Parameter usage profiler

Parameter profiler provides invoke and load statistics:

  • totalTime = total invoke time in milliseconds
  • minTime = minimal invoke time in milliseconds
  • maxTime = maximal invoke time in milliseconds
  • count = number of times given parameter was invoked
  • key = parameter's code

Remember that the first invocation of a parameter performs 2 heavy operations:

  • fetching a whole matrix,
  • building an in-memory index for fast searches.

All subsequent invocations are fast, as no I/O is needed - just in-memory index lookup.

Hyperon Runtime

Parameter profiler in Hyperon Runtime can be fetched by using the pl.decerto.hyperon.runtime.profiler.engine.EngineProfiler.PARAMETER enum. To get invoke statistics just invoke getInvokeStats() method, as shown below:

List<ProfilerStat> invokeStats = EngineProfiler.PARAMETER.getInvokeStats();
 //do something with invoke stats 

To reset invoke stats, invoke clear() method as shown below:

EngineProfiler.PARAMETER.getInvokeProfiler().clear()

To get load statistics just invoke getLoadStats() method, as shown below:

List<ProfilerStat>  loadStats = EngineProfiler.PARAMETER.getLoadStats();
//do something with load stats  

To reset load stats, invoke clear() method as shown below:

EngineProfiler.PARAMETER.getLoadProfiler().clear()

Hyperon Runtime-REST

To see all parameter statistics in Hyperon Runtime-REST, go to https://<your_hyperon_runtime_rest_url>/api/profiler/parameter.

Hyperon Studio

To see all statistics, go to https://<your_hyperon_studio_url>/profiler .

For example:

if Hyperon Studio is available via url: https://hyperon_demo.com/hyperon/app

profiler's page is available via url https://hyperon_demo.com/hyperon/profiler

To log into profiler's page use Hyperon Studio credentials.

IMPORTANT
Statistics shown in Hyperon Studio profiler are not your application statistics! These are stats from Hyperon Studio, for example from Hyperon Tester invocations.

Function usage profiler

Function profiler provides invoke and load statistics:

  • totalTime = total invoke time in milliseconds
  • minTime = minimal invoke time in milliseconds
  • maxTime = maximal invoke time in milliseconds
  • count = number of times given function was invoked
  • key = function's code

Remember that the first invocation of function performs function compiling that might take some time. All subsequent invocations are fast, as no compilation is needed.

Hyperon Runtime

Function profiler in Hyperon Runtime can be fetched by using the pl.decerto.hyperon.runtime.profiler.engine.EngineProfiler.FUNCTION enum. To get invoke statistics just invoke getInvokeStats() method, as shown below:

List<ProfilerStat> invokeStats = EngineProfiler.FUNCTION.getInvokeStats();
//do something with invoke stats 

To reset invoke stats, invoke clear() method as shown below:

EngineProfiler.FUNCTION.getInvokeProfiler().clear()

To get load statistics just invoke getLoadStats() method, as shown below:

List<ProfilerStat> loadStats = EngineProfiler.FUNCTION.getLoadStats();
//do something with load stats  

To reset load stats, invoke clear() method as shown below:

EngineProfiler.FUNCTION.getLoadProfiler().clear()

Hyperon Runtime-REST

To see all function statistics in Hyperon Runtime-REST, go to https://<your_hyperon_runtime_rest_url>/api/profiler/function.

Hyperon Studio

To see all statistics, go to https://<your_hyperon_studio_url>/profiler

For example,

if Hyperon Studio is available via url: https://hyperon_demo.com/hyperon/app

profiler's page is available via url https://hyperon_demo.com/hyperon/profiler

To log into profiler's page use Hyperon Studio credentials.

IMPORTANT
Statistics shown in Hyperon Studio profiler are not your application statistics! These are stats from Hyperon Studio, for example from Hyperon Tester invocations.

Domain attribute usage profiler

Domain attribute profiler provides invoke and load statistics:

  • totalTime = total invoke time in milliseconds
  • minTime = minimal invoke time in milliseconds
  • maxTime = maximal invoke time in milliseconds
  • count = number of times given attribute was invoked
  • key = domain attribute's code

Hyperon Runtime

Domain attribute profiler in Hyperon Runtime can be fetched by using the pl.decerto.hyperon.runtime.profiler.engine.AttributeEngineProfiler.DOMAIN enum. To get invoke statistics just invoke getInvokeStats() method, as shown below:

List<ProfilerStat> invokeStats = AttributeEngineProfiler.DOMAIN.getInvokeStats();
//do something with invoke stats

To reset invoke stats, invoke clear() method as shown below:

AttributeEngineProfiler.DOMAIN.getInvokeProfiler().clear()

To get load statistics just invoke getLoadStats() method, as shown below:

List<ProfilerStat> loadStats = AttributeEngineProfiler.DOMAIN.getLoadStats();
//do something with load stats

To reset load stats, invoke clear() method as shown below:

AttributeEngineProfiler.DOMAIN.getLoadProfiler().clear()

Hyperon Runtime-REST

To see all domain attribute statistics in Hyperon Runtime-REST, go to https://<your_hyperon_runtime_rest_url>/api/profiler/domain/attr.

Hyperon Studio

To see all statistics, go to https://<your_hyperon_studio_url>/profiler

‍For example,

if Hyperon Studio is available via url: https://hyperon_demo.com/hyperon/app

profiler's page is available via url https://hyperon_demo.com/hyperon/profiler

‍To log into profiler's page use Hyperon Studio credentials.

IMPORTANT
Statistics shown in Hyperon Studio profiler are not your application statistics! These are stats from Hyperon Studio, for example from Hyperon Tester invocations.

More tutorials

Tips & Tricks