Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private QueryStatusResult(org.neo4j.kernel.api.query.QuerySnapshot query, org.neo4j.kernel.impl.core.EmbeddedProxySPI manager, java.time.ZoneId zoneId) throws org.neo4j.kernel.api.exceptions.InvalidArgumentsException
        private QueryStatusResult(QuerySnapshot query, EmbeddedProxySPI manager, ZoneId zoneId)
        {
            this.QueryId           = ofInternalId(query.InternalQueryId()).ToString();
            this.Username          = query.Username();
            this.Query             = query.QueryText();
            this.Parameters        = AsRawMap(query.QueryParameters(), new ParameterWriter(manager));
            this.StartTime         = formatTime(query.StartTimestampMillis(), zoneId);
            this.ElapsedTimeMillis = MicrosAsMillis(query.ElapsedTimeMicros()).Value;
            this.ElapsedTime       = formatInterval(ElapsedTimeMillis);
            ClientConnectionInfo clientConnection = query.ClientConnection();

            this.ConnectionDetails   = clientConnection.AsConnectionDetails();
            this.Protocol            = clientConnection.Protocol();
            this.ClientAddress       = clientConnection.ClientAddress();
            this.RequestUri          = clientConnection.RequestURI();
            this.MetaData            = query.TransactionAnnotationData();
            this.CpuTimeMillis       = MicrosAsMillis(query.CpuTimeMicros());
            this.Status              = query.Status();
            this.ResourceInformation = query.ResourceInformation();
            this.ActiveLockCount     = query.ActiveLockCount();
            this.WaitTimeMillis      = MicrosAsMillis(query.WaitTimeMicros()).Value;
            this.IdleTimeMillis      = MicrosAsMillis(query.IdleTimeMicros());
            this.Planner             = query.Planner();
            this.Runtime             = query.Runtime();
            this.Indexes             = query.Indexes();
            this.AllocatedBytes      = query.AllocatedBytes();
            this.PageHits            = query.PageHits();
            this.PageFaults          = query.PageFaults();
            this.ConnectionId        = clientConnection.ConnectionId();
        }
Esempio n. 2
0
        internal static void FormatDetailedTime(StringBuilder result, QuerySnapshot query)
        {
            result.Append("(planning: ").Append(TimeUnit.MICROSECONDS.toMillis(query.CompilationTimeMicros()));
            long?cpuTime = TimeUnit.MICROSECONDS.toMillis(query.CpuTimeMicros());

            if (cpuTime != null)
            {
                result.Append(", cpu: ").Append(cpuTime);
            }
            result.Append(", waiting: ").Append(TimeUnit.MICROSECONDS.toMillis(query.WaitTimeMicros()));
            result.Append(") - ");
        }