public void updateProfile(WorkerInfo.State state) { double ramPercent = (totalMemory - ramCounter.NextValue()) * 100 / totalMemory; WorkerInfo info = new WorkerInfo(roleInstanceId, state, cpuCounter.NextValue(), ramPercent); cloudTable.Execute(TableOperation.InsertOrReplace(info)); }
private void updateState(WorkerInfo.State state, bool instantRefresh = false) { currentState = state; if (instantRefresh) { WorkerMonitor.GetInstance().updateProfile(state); } }