Skip to content

Commit

Permalink
Merge branch 'hotfix/updateChannelSubscribe'
Browse files Browse the repository at this point in the history
  • Loading branch information
CWFranklin committed May 9, 2014
2 parents 22205c0 + de81f83 commit dd107cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CadenceHost/Helpers/Statistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public Statistics()
/// <returns>The current CPU usage</returns>
public string GetCurrentCpu()
{
return _cpuCounter.NextValue().ToString(CultureInfo.InvariantCulture);
return Convert.ToInt32(_cpuCounter.NextValue()).ToString(CultureInfo.InvariantCulture);
}

/// <summary>
Expand Down
6 changes: 4 additions & 2 deletions CadenceHost/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,19 @@ public MainWindow()

private void OnPulse(object sender, EventArgs e)
{
var currentCpu = _statsHelper.GetCurrentCpu();

AddDebugInfo(
String.Format("Sending Pulse to server with CPU: {0}, RAM: {1}, Disk Usage: {2} and Uptime: {3} with a Total RAM Size of: {4}",
_statsHelper.GetCurrentCpu(), _statsHelper.GetCurrentRam(), "%DISK%", "%UPTIME%", _statsHelper.GetTotalRamSize()));
currentCpu, _statsHelper.GetCurrentRam(), "%DISK%", "%UPTIME%", _statsHelper.GetTotalRamSize()));

var timeSpan = (DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0));

var dataToSend = new NameValueCollection
{
{"server_id", _serverID.ToString()},
{"ram_usage", _statsHelper.GetCurrentRamPercent()},
{"cpu_usage", _statsHelper.GetCurrentCpu()},
{"cpu_usage", currentCpu},
{"disk_usage", "0"},
{"uptime", "0"},
{"timestamp", timeSpan.TotalSeconds.ToString(CultureInfo.InvariantCulture)}
Expand Down

0 comments on commit dd107cc

Please sign in to comment.