예제 #1
0
		private void ParseCounter(Messages.PerfCounter perfCounter)
		{
			if(!m_counters.ContainsKey(perfCounter.CounterId))
			{
				var counter = new Counter { Id = perfCounter.CounterId, Name = string.Empty };
				m_counters.Add(counter.Id, counter);
				RequestCounterName(counter.Id);
			}

			m_data.PerfCounter(perfCounter.CounterId, perfCounter.TimeStamp, perfCounter.Value);
		}
예제 #2
0
		public virtual void MapCounter(Counter counter)
		{
			using(var session = OpenSession(0))
			using(var tx = session.BeginTransaction())
			{
				session.SaveOrUpdateCopy(counter);
				tx.Commit();
			}
		}
예제 #3
0
		private void NameCounter(Messages.CounterName counterName)
		{
			Counter counter = new Counter { Id = counterName.CounterId, Name = counterName.Name };
			if(!m_counters.ContainsKey(counter.Id))
				m_counters.Add(counter.Id, counter);
			else
				m_counters[counter.Id].Name = counter.Name;

			m_data.MapCounter(counter);
		}