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"?>
<Query xmlns="endeca:stats">

      <RecordPath query_string="fn:collection()/record[author_nationality = &quot;english&quot;]">
        <StatInfo number_of_records="2">
            <Descendant unit="ms">0.47705078125</Descendant>
            <Self unit="ms">0.194580078125</Self>
            <Total unit="ms">0.671630859375</Total>
        <Predicate query_string="[author_nationality = &quot;english&quot;]">
          <StatInfo number_of_records="2">
              <Descendant unit="ms">0.287841796875</Descendant>
              <Self unit="ms">0.189208984375</Self>
              <Total unit="ms">0.47705078125</Total>
          <PropertyComparison query_string="author_nationality = &quot;english&quot;">
            <StatInfo number_of_records="2">
                <Descendant unit="ms">0.001953125</Descendant>
                <Self unit="ms">0.285888671875</Self>
                <Total unit="ms">0.287841796875</Total>
            <StringLiteral query_string="&quot;english&quot;">
              <StatInfo number_of_records="0">
                  <Descendant unit="ms">0</Descendant>
                  <Self unit="ms">0.001953125</Self>
                  <Total unit="ms">0.001953125</Total>


Copyright © Legal Notices