Skip to content

Commit

Permalink
Force update transfer rates after math tests, log total bytes at end
Browse files Browse the repository at this point in the history
  • Loading branch information
tuokri committed Jul 7, 2024
1 parent 10b6034 commit ab6a90b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/FCryptoGMPClient.uc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class FCryptoGMPClient extends TcpLink;
`include(FCrypto\Classes\FCryptoMacros.uci);

const BpsToMbps = 0.000008;
const BytesToMegaBytes = 0.000001;

var private int ClientPort;

Expand Down Expand Up @@ -321,6 +322,8 @@ simulated event Tick(float DeltaTime)
`fclog("final transfer rate values:");
LogTransferRates();
ClearTimer(NameOf(LogTransferRates));
`fclog("BytesOut :" @ BytesOut * BytesToMegaBytes @ "MB");
`fclog("BytesIn :" @ BytesIn * BytesToMegaBytes @ "MB");
}
super.Tick(DeltaTime);
Expand Down
5 changes: 5 additions & 0 deletions Classes/FCryptoTestMutator.uc
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,11 @@ private final simulated function int TestMath()
}
}

// Force sample update since timer in GMPClient might not
// fire at the right time to update samples between tests.
GMPClient.StopTransferRateSample();
GMPClient.LogTransferRates();

return TestFailures;
}

Expand Down

0 comments on commit ab6a90b

Please sign in to comment.