Support query of currently active section

Description

Provide the section for which Bytecode is currently measured (if the measurement is not finished). Use a parameter to switch this behavior on or off.

Environment

None

Activity

Show:
Former user
September 27, 2012, 12:34 PM

ByCounter has now been adapted as proposed. The EMF version was implemented as well.

Henning Groenda
September 17, 2012, 4:41 PM

There can be more than one active section in the case of threads executed in parallel. The interface should be modified from queryActiveSection() to queryActiveSection(long threadId). Furthermore, the method should return the appropriate EntityToInstrument and not an internal administration object like ActiveSection.
The resulting method signature should be:
EntityToInstrument queryActiveSection(long threadId)

Implement also in EMF-version:
EntityToInstrument ByCounterWrapper.queryActiveSection(long threadId);
This implementation allows direct access to the information on model-level.

Former user
August 20, 2012, 12:05 PM

As requested, queryActiveSection() can now throw an InvalidQueryException.

Henning Groenda
August 15, 2012, 11:25 AM

Calling queryActiveSection() if the configuration parameter is not set should throw an exception giving the explanation the this will only return a value with the configuration parameter set to true. If the currently active section cannot be determined and the parameter is set, it should still return null.

Former user
August 11, 2012, 4:36 PM

Querying support is now available if the option InstrumentationParameters.setProvideOnlineSectionActiveUpdates(true) is provided. For this purpose, CountingResultCollector has a new method queryActiveSection(). This method will return the section that is currently being executed if the section was specified for instrumentation. Null is returned in any other execution state.
This means that querying the active section is very dependent on timing. The new test case TestQueryUpdates therefore uses synchronisation to be able to reliably query all sections during execution of the test code.

Fixed

Assignee

Former user

Reporter

Henning Groenda

Labels

None

Requirement Category

Functional

External issue URL

None

Time tracking

0m

Time remaining

0m

Components

Priority

Major