The EQL per-query statistics log is turned off by default.
You can specify its creation by using
the dgraph
--log_stats flag:
--log_stats path
The path argument sets the path and filename for the log.
This argument must be a filename, not a directory. If the file cannot be opened, no logging will be performed. The log file uses an XML format, as shown in the following example that shows a log entry for this simple query:
fn:collection()/record[author_nationality = "english"]
To read the file, you can open it with a text editor, such as TextPad.
<?xml version="1.0" encoding="UTF-8"?>
<Queries>
<Query xmlns="endeca:stats">
<EndecaQueryLanguage>
<Stats>
<RecordPath query_string="fn:collection()/record[author_nationality = "english"]">
<StatInfo number_of_records="2">
<TimeInfo>
<Descendant unit="ms">0.47705078125</Descendant>
<Self unit="ms">0.194580078125</Self>
<Total unit="ms">0.671630859375</Total>
</TimeInfo>
</StatInfo>
<Predicate query_string="[author_nationality = "english"]">
<StatInfo number_of_records="2">
<TimeInfo>
<Descendant unit="ms">0.287841796875</Descendant>
<Self unit="ms">0.189208984375</Self>
<Total unit="ms">0.47705078125</Total>
</TimeInfo>
</StatInfo>
<PropertyComparison query_string="author_nationality = "english"">
<StatInfo number_of_records="2">
<TimeInfo>
<Descendant unit="ms">0.001953125</Descendant>
<Self unit="ms">0.285888671875</Self>
<Total unit="ms">0.287841796875</Total>
</TimeInfo>
</StatInfo>
<StringLiteral query_string=""english"">
<StatInfo number_of_records="0">
<TimeInfo>
<Descendant unit="ms">0</Descendant>
<Self unit="ms">0.001953125</Self>
<Total unit="ms">0.001953125</Total>
</TimeInfo>
</StatInfo>
</StringLiteral>
</PropertyComparison>
</Predicate>
</RecordPath>
</Stats>
</EndecaQueryLanguage>
</Query>
</Queries>The following table describes the meanings of the elements and attributes.
|
Element/Attribute |
Description |
|---|---|
|
|
Encapsulates the statistics for a given
query (that is, each query will have its own
|
|
|
The record path of a
|
|
|
Lists the time spent processing the predicate part of a query. |
|
|
Lists the time spent processing an
expression part of an query, such as
|
|
|
For
|
|
|
Returns the number of records which
satisfy the
|
|
|
Encapsulates the
|
|
|
Encapsulates time-related information about the node. |
|
|
The time, in milliseconds, spent in the descendants of a given node. |
|
|
The total amount of time, in milliseconds, spent in this node. |
|
|
The total amount of time, in milliseconds, spent in this node and its descendants. |
|
|
Encapsulates information about cache hits, misses, and insertions. Cache is checked only when a combined relationship filter and range comparison is made. |

