IAlgorithmCalculationResult.Load

Syntax

Load: IAlgorithmTimeResults;

None;

Description

The Load property returns the result of loading data source.

Example

Executing the example requires that the repository contains a ready calculation algorithm with the ALGORITHM identifier. The calculation algorithm should contains configured objects.

Add a link to the Calculation Algorithm Core custom assembly contained in the Calculation Algorithms component, and links to the Algo, Metabase system assemblies.

Sub UserProc;
Var
    
MB: IMetabase;
    MObj: IMetabaseObjectDescriptor;
    Algo: ICalcObject;
    CalcAlgo: ICalcAlgorithm;
    CalcResult: IAlgorithmCalculationResult;
    Load, Save: IAlgorithmTimeResults;
    Result: IAlgorithmTimeResult;
    i: Integer;
    Sec: Double;
Begin
    MB := MetabaseClass.Active;
    
// Get calculation algorithm
    MObj := MB.ItemById("ALGORITHM");
    Algo := CalcObjectFactory.CreateCalcObject(MObj, 
True);
    CalcAlgo := Algo 
As ICalcAlgorithm;
    
// Calculate algorithm
    CalcResult := CalcAlgo.Calculate;
    
// Display data sources loading result in the console
    Load := CalcResult.Load;
    Debug.WriteLine(
"Data sources loading result:");
    
For i:=0 To Load.Count-1 Do
        Result := Load.Item(i);
        Debug.WriteLine(
" Name: " + Result.Name);
        Debug.WriteLine(
" Identifier: " + Result.Id);
        Sec := Result.ExecuteMilisecods/
1000;
        Debug.WriteLine(
" Loading time: " +  Sec.ToString + " sec");
        Debug.WriteLine(
"");
    
End For;
    
// Display result of data saving in consumers in the console
    Save := CalcResult.Save;
    Debug.WriteLine(
"Result of saving data in consumers:");
    
For i:=0 To Save.Count-1 Do
        Result := Save.Item(i);
        Debug.WriteLine(
" Name: " + Result.Name);
        Debug.WriteLine(
" Identifier: " + Result.Id);
        Sec := Result.ExecuteMilisecods/
1000;
        Debug.WriteLine(
" Saving time: " +  Sec.ToString + " sec");
        Debug.WriteLine(
"");
    
End For;    
End Sub UserProc;

Not provisioned.

After executing the example, the calculation algorithm is calculated. The console displays the results of loading data sources and saving data in consumers, for example:

Data sources loading result:

 Name: Filter

 Identifier: FILTER

 Loading time: 0.007 sec

 Name: Cube

 Identifier: CUBE

 Loading time: 0.005 sec

Result of saving data in consumers:

 Name: Cube

 Identifier: CUBE

 Saving time: 0.013 sec

See also:

IAlgorithmCalculationResult