code: function buildTotals(profile) {
          const root = profile.resultRoot;
          const tmpList = [root];
          const nodeList = [];
          //进入循环遍历
          while (tmpList.length) {
              const node = tmpList.pop();
              node.total = node.self;
              nodeList.push(node);
              node.children.forEach(n => tmpList.push(n));
          }
          //计算 total 属性
          while (nodeList.length > 1) {
              const node = nodeList.pop();
              if (node.parent) node.parent.total += node.total;
          }
      }
docs: *
  @param {object} profile
  @description 计算各个节点的 total 属性值