with Context;
--
with Log;
with Profile;
with Program;
with Scheduler;

procedure Start_Monitoring is
    The_Job_Id : Program.Job_Id;
    The_Status : Program.Condition;
begin
    Program.Create_Job (S => "Performance.Monitor (15 * 60.0);",
                        Job => The_Job_Id,
                        Status => The_Status,
                        Debug => False,
                        Context => Context,
                        After => 0.0,
                        Options => "name = (Performance Monitor)",
                        Response => "<PROFILE>");
    if Program.Started_Successfully (The_Status) then
        Scheduler.Set_Job_Attribute (The_Job_Id);
        Log.Put_Line ("Performance Monitor started successfully as Job " &
                      Program.Job_Id'Image (The_Job_Id), Profile.Positive_Msg);
    else
        Log.Put_Line ("Performance Monitor NOT started", Profile.Error_Msg);
    end if;
end Start_Monitoring;