Skip to content

Commit 30f204f

Browse files
authored
Merge pull request #21 from neo4j-contrib/revert-20-profiler-statistics
Revert "Show statement update statistics in profiler"
2 parents 2bbd7b1 + bf0d119 commit 30f204f

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

Collector/QueryLogger.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use GraphAware\Common\Cypher\StatementInterface;
88
use GraphAware\Common\Result\StatementResult as StatementResultInterface;
9-
use GraphAware\Common\Result\StatementStatisticsInterface;
109

1110
/**
1211
* @author Xavier Coureau <[email protected]>
@@ -49,7 +48,6 @@ public function record(StatementInterface $statement)
4948
'query' => $statementText,
5049
'parameters' => $statementParams,
5150
'tag' => $statement->getTag(),
52-
'statistics' => [],
5351
];
5452
$this->statementsHash[$statementText][$statementParams][$tag] = $idx;
5553
}
@@ -76,7 +74,6 @@ public function finish(StatementResultInterface $statementResult)
7674
$this->statements[$idx] = array_merge($this->statements[$idx], [
7775
'end_time' => microtime(true) * 1000,
7876
'nb_results' => $statementResult->size(),
79-
'statistics' => $this->statisticsToArray($statementResult->summarize()->updateStatistics()),
8077
]);
8178
}
8279

@@ -121,24 +118,4 @@ public function getElapsedTime()
121118

122119
return $time;
123120
}
124-
125-
private function statisticsToArray(StatementStatisticsInterface $statementStatistics)
126-
{
127-
$data = [
128-
'contains_updates' => $statementStatistics->containsUpdates(),
129-
'nodes_created' => $statementStatistics->nodesCreated(),
130-
'nodes_deleted' => $statementStatistics->nodesDeleted(),
131-
'relationships_created' => $statementStatistics->relationshipsCreated(),
132-
'relationships_deleted' => $statementStatistics->relationshipsDeleted(),
133-
'properties_set' => $statementStatistics->propertiesSet(),
134-
'labels_added' => $statementStatistics->labelsAdded(),
135-
'labels_removed' => $statementStatistics->labelsRemoved(),
136-
'indexes_added' => $statementStatistics->indexesAdded(),
137-
'indexes_removed' => $statementStatistics->indexesRemoved(),
138-
'constraints_added' => $statementStatistics->constraintsAdded(),
139-
'constraints_removed' => $statementStatistics->constraintsRemoved(),
140-
];
141-
142-
return $data;
143-
}
144121
}

Resources/views/webprofiler.html.twig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@
7676
<div>
7777
<strong class="font-normal text-small">Number of results</strong>: {{ statement.nb_results }}
7878
</div>
79-
<div>
80-
<strong class="font-normal text-small">Statistics</strong>: {{ statement.statistics|yaml_encode }}
81-
</div>
8279
</div>
8380
</td>
8481
</tr>

0 commit comments

Comments
 (0)