[update] Add timer categories for operations.

We have a lot of time spent in * which makes it hard to optimize.

Change-Id: I24461749caf1782fcdc48edd53536b75df5907e7
Reviewed-on: https://fuchsia-review.googlesource.com/c/jiri/+/392222
Reviewed-by: Haowei Wu <haowei@google.com>
Commit-Queue: Nathan Mulcahey <nmulcahey@google.com>
diff --git a/project/operations.go b/project/operations.go
index 26b71d7..17275b6 100644
--- a/project/operations.go
+++ b/project/operations.go
@@ -705,6 +705,8 @@
 
 // This function creates worktree and runs create operation in parallel
 func runCreateOperations(jirix *jiri.X, ops []createOperation) MultiError {
+	jirix.TimerPush("create operations")
+	defer jirix.TimerPop()
 	count := len(ops)
 	if count == 0 {
 		return nil
@@ -836,6 +838,8 @@
 }
 
 func runDeleteOperations(jirix *jiri.X, ops []deleteOperation, gc bool) error {
+	jirix.TimerPush("delete operations")
+	defer jirix.TimerPop()
 	if len(ops) == 0 {
 		return nil
 	}
@@ -884,6 +888,8 @@
 }
 
 func runMoveOperations(jirix *jiri.X, ops []moveOperation) error {
+	jirix.TimerPush("move operations")
+	defer jirix.TimerPop()
 	parentSrcPath := ""
 	parentDestPath := ""
 	for _, op := range ops {
@@ -906,6 +912,8 @@
 }
 
 func runCommonOperations(jirix *jiri.X, ops operations, loglevel log.LogLevel) error {
+	jirix.TimerPush("common operations")
+	defer jirix.TimerPop()
 	for _, op := range ops {
 		logMsg := fmt.Sprintf("Updating project %q", op.Project().Name)
 		task := jirix.Logger.AddTaskMsg(logMsg)