Example #1
0
 public static Execution FromOperationCompleted(OperationCompletedEventArgs e)
 {
     var execution= new Execution();
     execution.Expection = e.Exception;
     execution.Timestamp = DateTimeOffset.Now;
     execution.QueryText = CypherExtension.GetFormattedCypher(e.QueryText);
     execution.FormattedDebugText = CypherExtension.GetFormattedCypher(e.QueryText); // need to update the neo4jclient to get the debug text
     return execution;
 }
Example #2
0
        public void AddIfEnabled(Execution execution)
        {
            if (Enabled)
            {
                _executions.Enqueue(execution);
            }

            // Don't memory leak if someone turns this on in prod
            if (_executions.Count > MaxCount)
            {
                _executions.Dequeue();
            }
        }