Skip to content

Commit

Permalink
Add token consumption to run history page
Browse files Browse the repository at this point in the history
  • Loading branch information
stkillen committed Sep 26, 2024
1 parent ae279fd commit 62e63a7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Tools/AI Test Toolkit/src/Logs/AITRunHistory.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ page 149036 "AIT Run History"
Caption = 'Total Duration (ms)';
ToolTip = 'Specifies Total Duration of the tests for the base version.';
}
field("Tokens - By Version"; Rec."Tokens Consumed")
{
Visible = ViewBy = ViewBy::Version;
Caption = 'Total Tokens Consumed';
ToolTip = 'Specifies the aggregated number of tokens consumed by the test in the current version. This is applicable only when using Microsoft AI Module.';
}
field("No. of Tests - By Tag"; Rec."No. of Tests Executed - By Tag")
{
Visible = ViewBy = ViewBy::Tag;
Expand Down Expand Up @@ -161,6 +167,12 @@ page 149036 "AIT Run History"
Caption = 'Total Duration (ms)';
ToolTip = 'Specifies Total Duration of the tests for the base version.';
}
field("Tokens - By Tag"; Rec."Tokens Consumed - By Tag")
{
Visible = ViewBy = ViewBy::Tag;
Caption = 'Total Tokens Consumed';
ToolTip = 'Specifies the aggregated number of tokens consumed by the test in the current version. This is applicable only when using Microsoft AI Module.';
}
}
}
}
Expand Down
16 changes: 16 additions & 0 deletions src/Tools/AI Test Toolkit/src/Logs/AITRunHistory.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ table 149036 "AIT Run History"
FieldClass = FlowField;
CalcFormula = sum("AIT Log Entry"."Duration (ms)" where("Test Suite Code" = field("Test Suite Code"), "Version" = field("Version"), "Test Method Line No." = field("Line No. Filter"), Operation = const('Run Procedure'), "Procedure Name" = filter(<> '')));
}
field(13; "Tokens Consumed"; Integer)
{
Caption = 'Total Tokens Consumed';
ToolTip = 'Specifies the aggregated number of tokens consumed by the test in the current version. This is applicable only when using Microsoft AI Module.';
Editable = false;
FieldClass = FlowField;
CalcFormula = sum("AIT Log Entry"."Tokens Consumed" where("Test Suite Code" = field("Test Suite Code"), Version = field("Version"), "Test Method Line No." = field("Line No. Filter"), Operation = const('Run Procedure'), "Procedure Name" = filter(<> '')));
}
field(20; "No. of Tests Executed - By Tag"; Integer)
{
Caption = 'No. of Tests Executed';
Expand All @@ -90,6 +98,14 @@ table 149036 "AIT Run History"
FieldClass = FlowField;
CalcFormula = sum("AIT Log Entry"."Duration (ms)" where("Test Suite Code" = field("Test Suite Code"), "Test Method Line No." = field("Line No. Filter"), Tag = field(Tag), Operation = const('Run Procedure'), "Procedure Name" = filter(<> '')));
}
field(23; "Tokens Consumed - By Tag"; Integer)
{
Caption = 'Total Tokens Consumed';
ToolTip = 'Specifies the aggregated number of tokens consumed by the test in the current version. This is applicable only when using Microsoft AI Module.';
Editable = false;
FieldClass = FlowField;
CalcFormula = sum("AIT Log Entry"."Tokens Consumed" where("Test Suite Code" = field("Test Suite Code"), "Test Method Line No." = field("Line No. Filter"), Tag = field(Tag), Operation = const('Run Procedure'), "Procedure Name" = filter(<> '')));
}
}

keys
Expand Down

0 comments on commit 62e63a7

Please sign in to comment.