Node Index Tree for Graphite metrics

Tree representation of Graphite metrics

class influxgraph.classes.tree.Node

Node class of a graphite metric

static from_array(array)

Load given parent node’s children from array

insert(paths)

Insert path in this node’s children

is_leaf()

Returns True/False depending on whether self is a LeafNode or not

to_array()

Return list of (name, children) items for this node’s children

class influxgraph.classes.tree.NodeTreeIndex

Node tree index class with graphite glob searches per sub-part of a query

clear()

Clear tree index

static from_array(model)

Load tree index from array

static from_file(file_h)

Load tree index from file handle

insert(metric_path)

Insert metric path into tree index

insert_split_path(paths)

Insert already split path into tree index

query(query)

Return nodes matching Graphite glob pattern query

search(node, split_query, split_path)

Return matching children for each query part in split query starting from given node

to_array()

Return array representation of tree index