@Override protected void serialize(MappingSerializer serializer) { serializer.putBoolean("contains_updates", stats.containsUpdates()); serializer.putNumber("nodes_created", stats.getNodesCreated()); serializer.putNumber("nodes_deleted", stats.getDeletedNodes()); serializer.putNumber("properties_set", stats.getPropertiesSet()); serializer.putNumber("relationships_created", stats.getRelationshipsCreated()); serializer.putNumber("relationship_deleted", stats.getDeletedRelationships()); serializer.putNumber("labels_added", stats.getLabelsAdded()); serializer.putNumber("labels_removed", stats.getLabelsRemoved()); serializer.putNumber("indexes_added", stats.getIndexesAdded()); serializer.putNumber("indexes_removed", stats.getIndexesRemoved()); serializer.putNumber("constraints_added", stats.getConstraintsAdded()); serializer.putNumber("constraints_removed", stats.getConstraintsRemoved()); }
public Map getQueryStatistics() { final Map<String, Object> stats = MapUtil.map( "rows", getRowCount(), "time", getTime()); if (queryStatistics != null && queryStatistics.containsUpdates()) { stats.put("containsUpdates", queryStatistics.containsUpdates()); stats.put("nodesDeleted", queryStatistics.getDeletedNodes()); stats.put("relationshipsDeleted", queryStatistics.getDeletedRelationships()); stats.put("nodesCreated", queryStatistics.getNodesCreated()); stats.put("relationshipsCreated", queryStatistics.getRelationshipsCreated()); stats.put("propertiesSet", queryStatistics.getPropertiesSet()); stats.put("text", queryStatistics.toString()); } return stats; }