Here's a link to the current python script:
It consists of two things
A) A part that sets up the rendering flow, loads the right rendering system settings etc.
B) A part that estimates progress
There is some documentation in the script as to what it attempts to do.
Blender is a complex beast. Artists can build up multi-layered composite scenes, or even multi-scene structures with interlinked rendering. The script tries to create a tree of what is about to happen during the rendering passes by walking through the post-processing tree of the primary scene, counting each layer's tiles etc.; then when the actual render is in progress it counts the number of updates from Blender and reports the progress to Glue3 through an extremely simple protocol.
The two outstanding issues for Cycles renders is that
1) Cycles will produce updates during render even between tiles. This breaks the original assumption (from Blender Internal) that updates were only given when a tile completes. The script will need to pull this info via python instead of relying on counters. We see that BI is also starting to use this approach, so maybe the update counter could be made more generic.
2) The post-processing tree will sometimes not include all passes because some passes depend on scene settings too. This is especially the case when a scene contains large amounts of generated geometry as compared to just static geometry. Cycles can take some time to start each pass up, this is not included at all right now.
One of the good things about this particular task is that you can do it without knowing anything at all about BURP since it is completely isolated to a python script running inside Blender.