core: log eval tree operations

This commit is contained in:
Paul Hinze 2016-02-24 09:49:11 -06:00
parent cb8f0f04b5
commit 8472c7d59f
1 changed files with 4 additions and 2 deletions

View File

@ -96,7 +96,8 @@ func (w *ContextGraphWalker) EnterPath(path []string) EvalContext {
}
func (w *ContextGraphWalker) EnterEvalTree(v dag.Vertex, n EvalNode) EvalNode {
log.Printf("[TRACE] Entering eval tree: %s", dag.VertexName(v))
log.Printf("[TRACE] [%s] Entering eval tree: %s",
w.Operation, dag.VertexName(v))
// Acquire a lock on the semaphore
w.Context.parallelSem.Acquire()
@ -108,7 +109,8 @@ func (w *ContextGraphWalker) EnterEvalTree(v dag.Vertex, n EvalNode) EvalNode {
func (w *ContextGraphWalker) ExitEvalTree(
v dag.Vertex, output interface{}, err error) error {
log.Printf("[TRACE] Exiting eval tree: %s", dag.VertexName(v))
log.Printf("[TRACE] [%s] Exiting eval tree: %s",
w.Operation, dag.VertexName(v))
// Release the semaphore
w.Context.parallelSem.Release()