[augeas-devel] Subtree size

Francis Giraldeau francis.giraldeau at usherbrooke.ca
Sat Oct 16 14:36:37 UTC 2010


Hi, 

I wanted to know the size of the augeas tree to calculate the memory
impact of adding indexes to tree nodes, and no function was existing for
this. aug_get is returning the size of the node set match by PATH, but
this is not the size of the tree i.e. it's not recursive. 

I would propose the attached patch to add this capability to the API. I
find that it could be useful also for sanity check in other
applications, like in a GUI, when a duplicated model must stay in sync
with the augeas tree. 

Cheer, 

Francis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-function-to-get-a-subtree-size.patch
Type: text/x-patch
Size: 5046 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20101016/305283ab/attachment.bin>


More information about the augeas-devel mailing list