1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Added missing ()'s for allocations

This commit is contained in:
Brian Fiete 2020-05-11 10:16:24 -07:00
parent 2320e2eb8c
commit 40fe76d903
10 changed files with 21 additions and 21 deletions

View file

@ -45,7 +45,7 @@ namespace BeefPerf
public Socket mListenSocket ~ delete _;
public Thread mSocketThread ~ delete _;
public List<BpClient> mClients = new List<BpClient>() ~ delete _;
public List<BpSession> mSessions = new List<BpSession> ~ DeleteContainerAndItems!(_);
public List<BpSession> mSessions = new List<BpSession>() ~ DeleteContainerAndItems!(_);
public Monitor mClientMonitor = new Monitor() ~ delete _;
public WaitEvent mShutdownEvent = new WaitEvent() ~ delete _;
public BpSession mCurSession;

View file

@ -19,33 +19,33 @@ namespace BeefPerf
g.FillRect(0, 0, mWidth, mHeight);
g.SetFont(DarkTheme.sDarkTheme.mSmallFont);
g.DrawString(scope String..AppendF("FPS: {0}", gApp.mLastFPS), 4, 0);
g.DrawString(scope String()..AppendF("FPS: {0}", gApp.mLastFPS), 4, 0);
//
g.DrawString(scope String..AppendF("{0}", gApp.mUpdateCnt), 0, 0, .Right, mWidth - 8);
g.DrawString(scope String()..AppendF("{0}", gApp.mUpdateCnt), 0, 0, .Right, mWidth - 8);
float curY = 64;
if (!gApp.mListenSocket.IsConnected)
{
using (g.PushColor(0xFFFF4040))
g.DrawString(scope String..AppendF("Failed to listen on port {0}", gApp.mListenPort), 0, 0, .Right, mWidth - 8);
g.DrawString(scope String()..AppendF("Failed to listen on port {0}", gApp.mListenPort), 0, 0, .Right, mWidth - 8);
}
else
{
g.DrawString(scope String..AppendF("Clients: {0}", gApp.mClients.Count), curY, 0);
g.DrawString(scope String()..AppendF("Clients: {0}", gApp.mClients.Count), curY, 0);
curY += 64;
float kPerSec = gApp.mStatBytesPerSec / 1024.0f;
if ((kPerSec > 0) && (kPerSec < 0.1f))
kPerSec = 0.1f;
g.DrawString(scope String..AppendF("BPS: {0:0.0}k", kPerSec), curY, 0);
g.DrawString(scope String()..AppendF("BPS: {0:0.0}k", kPerSec), curY, 0);
curY += 80;
}
if (gApp.mBoard.mPerfView != null)
{
var client = gApp.mBoard.mPerfView.mSession;
g.DrawString(scope String..AppendF("Zones: {0}", (int32)client.mNumZones), curY, 0);
g.DrawString(scope String()..AppendF("Zones: {0}", (int32)client.mNumZones), curY, 0);
curY += 118;
var str = scope String();

View file

@ -110,7 +110,7 @@ namespace BeefPerf
BpClient.TimeToStr(timeUS, timeStr, false);
g.DrawString(timeStr, 4, 40, .Left, width - 8, .Ellipsis);
g.DrawString(scope String..AppendF("BPS: {0}k", session.mDispBPS), 4, 40, .Right, width - 8);
g.DrawString(scope String()..AppendF("BPS: {0}k", session.mDispBPS), 4, 40, .Right, width - 8);
}
curY += boxHeight + 4;