/// <summary> /// 追加 /// </summary> public override void Add() { Debug.WriteLine("m_PerformanceList.Count = " + Items.Count.ToString()); Process[] _Process = Process.GetProcessesByName(m_InstanceName); Debug.WriteLine("_Process.Length = " + _Process.Length.ToString()); if (!Running) { return; } //------------------------ // 値を取得し、履歴に登録 //------------------------ ArrayList _ValueList = new ArrayList(); for (int i = 0; i < Items.Count; i++) { PerformanceCounterObject _PerformanceCounterObject = Items.GetItem(i).Counter; PerformanceHistory <float> _PerformanceHistory = Items.GetItem(i).History; float value = _PerformanceCounterObject.NextValue(); _PerformanceHistory.Add(value); _ValueList.Add(value); } // ログ出力 PrintLog(_ValueList); }
/// <summary> /// 追加 /// </summary> public override void Add() { if (!Running) { return; } //------------------------ // 値を取得し、履歴に登録 //------------------------ ArrayList _ValueList = new ArrayList(); float _MaxValue = 10.0F; for (int i = 0; i < Items.Count; i++) { PerformanceCounterObject _PerformanceCounterObject = Items[i].Counter; PerformanceHistory <float> _PerformanceHistory = Items[i].History; float value = _PerformanceCounterObject.NextValue(); _PerformanceHistory.Add(value); _ValueList.Add(value); if (_PerformanceHistory.Max > _MaxValue) { _MaxValue = _PerformanceHistory.Max; } } this.ChartAreas[0].AxisY.Maximum = _MaxValue; this.ChartAreas[0].AxisY.Interval = (int)(_MaxValue / 10); // ログ出力 PrintLog(_ValueList); }
/// <summary> /// 削除 /// </summary> public override void Remove() { if (!Running) { return; } //------------------------------------------------ // 履歴の最大数を超えていたら、古い履歴を削除する //------------------------------------------------ for (int i = 0; i < Items.Count; i++) { PerformanceHistory <float> _PerformanceHistory = Items.GetItem(i).History; _PerformanceHistory.RemoveOldest(); } }
/// <summary> /// 追加 /// </summary> public override void Add() { //------------------------ // 値を取得し、履歴に登録 //------------------------ ArrayList _ValueList = new ArrayList(); for (int i = 0; i < Items.Count; i++) { PerformanceCounterObject _PerformanceCounterObject = Items[i].Counter; PerformanceHistory <float> _PerformanceHistory = Items[i].History; float value = this.TotalVisibleMemorySize - _PerformanceCounterObject.NextValue(); _PerformanceHistory.Add(value); _ValueList.Add(value); } // ログ出力 PrintLog(_ValueList); }
/// <summary> /// 表示 /// </summary> public override void ShowChart() { if (!Running) { return; } //----------------------- // チャートに値をセット //----------------------- for (int i = 0; i < Items.Count; i++) { this.Series[i].Points.Clear(); PerformanceHistory <float> _PerformanceHistory = Items.GetItem(i).History; foreach (float value in _PerformanceHistory.Queue) { // データをチャートに追加 DataPoint _DataPoint = new DataPoint(0, value); this.Series[i].Points.Add(_DataPoint); } } }
/// <summary> /// 追加 /// </summary> public override void Add() { if (!Running) { return; } //------------------------ // 値を取得し、履歴に登録 //------------------------ ArrayList _ValueList = new ArrayList(); for (int i = 0; i < Items.Count; i++) { PerformanceCounterObject _PerformanceCounterObject = Items.GetItem(i).Counter; PerformanceHistory <float> _PerformanceHistory = Items.GetItem(i).History; float value = _PerformanceCounterObject.NextValue(); _PerformanceHistory.Add(value); _ValueList.Add(value); } // ログ出力 PrintLog(_ValueList); }
public PerformanceItem(PerformanceCounterObject pCounter, PerformanceHistory <float> pHistory) { m_Counter = pCounter; m_History = pHistory; }
public void Add(PerformanceCounterObject pCounter, PerformanceHistory <float> pHistory) { this.Push(new PerformanceItem(pCounter, pHistory)); }