Java
import Rational.PureAPI;
class SnapshotClass
{
public static void main(String args[])
{
InputFunctionA();
PureAPI.ClearData();
ComputationFunctionB();
PureAPI.SaveData();
//The preceding function takes a snapshot of the
//measurement data collected for ComputationFunctionB. The
//data collected for the startup phase of the program was
//discarded before ComputationFunctionB was called.
PureAPI.ClearData();
ComputationFunctionC();
PureAPI.SaveData();
//The preceding function takes a snapshot of the
//measurement data collected for ComputationFunctionC.
PureAPI.DisableRecordingData();
//The preceding function disables recording of
//measurement data for the rest of the run.
OutputFunctionD(int);
}
}
C#
using System;
using Rational;
class SnapshotClass
{
public static void Main()
{
InputFunctionA();
PureAPI.ClearData();
ComputationFunctionB();
PureAPI.SaveData();
//The preceding function takes a snapshot of the data
//collected for ComputationFunctionB. The data collected
//for the startup phase of the program was discarded
//before ComputationFunctionB was called.
PureAPI.ClearData();
ComputationFunctionC();
PureAPI.SaveData();
//The preceding function takes a snapshot of the data
//collected for ComputationFunctionC.
PureAPI.DisableRecordingData();
//The preceding function disables recording of
//data for the rest of the run.
}
}
(C) Copyright IBM Corporation 1993, 2009.