Profile

The Profile aspect is part of the cross-platform Elements Profiler infrastructure, and defined in RemObjects.Elements.Profiler.Aspect.dll, which needs to be referenced manually before the aspect can be used.

The aspect can be used on classes and class members in order to have them become part of a profiling session. When profiling is active (by setting the "PROFILE" conditional define for your project and rebuilding), any class or member annotated with [Profile] will generate extra code that allows the profiler to track calls to the individual members.

After running your project within Fire or Water, you can browse the results in the Profiler View.

Profiling is available for all four platforms. Please refer to the Profiler topic in the Tools section for more details.

Parameters

The function of the aspect is always tied to the presence of the "PROFILE" conditional define; if not set, the aspect has no affect – no profiling code will be injected, and there will be no runtime overhead from leaving the aspect in place.

To conditionally profile different aspects for your project more granularly, the name of a second user-chosen conditional define can be provided to the aspect. When done so, the aspect will only be applied if both "PROFILE" and the user-chosen define are set. This allows you to toggle different sets of classes on and off for profiling.

type
  [Profile('PROFILE_FOO')]
  Foo = public class
    ...
  end;
[Profile("PROFILE_FOO")]
public class Foo
{
    ...
}
@Profile("PROFILE_FOO") 
public class Foo {
    ...
}
@Profile("PROFILE_FOO") 
public class Foo  
{
    ...
}

Defined in RemObjects.Elements.Profiler.Aspect.dll

See Also