[ library(instprofile) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

# statsample_control(+ProfileName, +State)

Enable / disable the sampling profiler for a named profile.

ProfileName
  Atom or string
State
  Atoms 'on' or 'off'

## Description

For the named profile, ProfileName, enable or disable the sampling profiler based on the value of State. Setting State to 'on' immediately enables sample collection at the inteval and to to the file specified in statsample/4.

For performance reasons, the results are written to File (specified by statsample/4) using buffered I/O - each result is not flushed to disk as it is written. As a result to ensure all results are flushed to the file, `statsample_control(ProfileName, off)` must be executed before the results file can be analysed.

### Fail Conditions

Profilename is not a valid profile defined by statsample/4.State is neither the atom 'on' nor the atom 'off'.

### Resatisfiable

no

## Examples

       [eclipse 2]: instprofile:statsample_control(memory, on).

       Yes (0.00s cpu)
       [eclipse 3]: ...

       Yes (10.24s cpu)
       [eclipse 4]: instprofile:statsample_control(memory, off).

       Yes (0.00s cpu)

## See Also

statsample / 4, statistics / 2, library(instprofile)