Skip to content

Commit 7909257

Browse files
committed
feat: Adding boolean good-hash
1 parent eed1a02 commit 7909257

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

utilities/common/utilities.data.entries.pas

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ TEntry = class(TObject)
4343
FLPI: TJSONStringType;
4444
FDPROJ: TJSONStringType;
4545
FHasRelease: Boolean;
46+
FGoodHash: Boolean;
4647
FThreads: Integer;
4748
FRunParams: TJSONStringType;
4849

@@ -87,6 +88,9 @@ TEntry = class(TObject)
8788
property HasRelease: Boolean
8889
read FHasRelease
8990
write FHasRelease;
91+
property GoodHash: Boolean
92+
read FGoodHash
93+
write FGoodHash;
9094
property Threads: Integer
9195
read FThreads
9296
write FThreads;
@@ -156,6 +160,7 @@ implementation
156160
cJSONLPI = 'lpi';
157161
cJSONDPROJ = 'dproj';
158162
cJSONHasRelease = 'has-release';
163+
cJSONGoodHash = 'good-hash';
159164
cJSONThreads = 'threads';
160165
cJSONRunParams = 'run-params';
161166

@@ -216,6 +221,7 @@ procedure TEntry.setFromJSONObject(const AJSONObject: TJSONObject);
216221
FLPI:= AJSONObject.Get(cJSONLPI, FLPI);
217222
FDPROJ:= AJSONObject.Get(cJSONDPROJ, FDPROJ);
218223
FHasRelease:= AJSONObject.Get(cJSONHasRelease, FHasRelease);
224+
FGoodHash:= AJSONObject.Get(cJSONGoodHash, FGoodHash);
219225
FThreads:= AJSONObject.Get(cJSONThreads, FThreads);
220226
FRunParams:= AJSONObject.Get(cJSONRunParams, FRunParams);
221227
end;

utilities/results_generator/Common/resultsgenerator.common.pas

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ TResult = class
2222
Name: String;
2323
Notes: String;
2424
Compiler: String;
25+
GoodHash: Boolean;
2526
Result: Double;
2627
Count: Integer;
2728
constructor Create;
@@ -77,6 +78,7 @@ constructor TResult.Create;
7778
Name := '';
7879
Notes := '';
7980
Compiler := '';
81+
GoodHash := False;
8082
Result := 0;
8183
Count := 0;
8284
end;
@@ -171,6 +173,7 @@ procedure TResults.Generate;
171173
FList[index2].Name:= UTF8Encode(FConfig.Entries[index].Name);
172174
FList[index2].Notes:= UTF8Encode(FConfig.Entries[index].Notes);
173175
FList[index2].Count := FResult.times.Count;
176+
FList[index2].GoodHash := FConfig.Entries[index].GoodHash;
174177
FList[index2].Result:= FResult.times.AvgValueWithOutMinMax;
175178
finally
176179
FResult.Free;
@@ -191,6 +194,7 @@ procedure TResults.Generate;
191194
content:= '';
192195
for index:= 0 to FList.Count - 1 do
193196
begin
197+
if not FList[index].GoodHash then FList[index].Notes:= FList[index].Notes + ' (**failed hash)**';
194198
content:= content + Format('| %d | %s | %s | %s | %s | |'+LineEnding, [
195199
index + 1,
196200
FormatTime(FList[index].Result),

0 commit comments

Comments
 (0)