Esempio n. 1
0
        public void MarkStart(string name)
        {
            var evt = new ProfilerEvent {
                TimeStamp = DateTime.UtcNow,
                Name      = name,
            };

            _timings.Push(evt);
        }
        internal override void AddMetricCore(string name, string str, DateTime?time)
        {
            var logger = Logger;

            if (logger.InfoEnabled)
            {
                var evt = new ProfilerEvent {
                    TimeStamp = time.GetValueOrDefault(DateTime.UtcNow).ToUniversalTime(),
                    Name      = name,
                    Value     = str,
                };

                logger.Info(evt);
            }
        }