perftools / perftools/xhgui

the Inclusive Wall Time of Current function bigger than all Child functions

Open
#266 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
341
PR merge metrics
No merged PRs in 30d

Description

image

the Inclusive Wall Time of current function is : 30,321us
and the total Inclusive Wall Time of all children function is less than 15,000us,
why ? I think the two time should nearly equal.
and the code is :

 protected function getTableMetadata($name, $type, $refresh)
    {
        $cache = null;
        if ($this->db->enableSchemaCache && !in_array($name, $this->db->schemaCacheExclude, true)) {
            $schemaCache = is_string($this->db->schemaCache) ? Yii::$app->get($this->db->schemaCache, false) : $this->db->schemaCache;
            if ($schemaCache instanceof Cache) {
                $cache = $schemaCache;
            }
        }
        $rawName = $this->getRawTableName($name);
        if ($refresh || !isset($this->_tableMetadata[$rawName])) {
            $this->loadTableMetadataFromCache($cache, $rawName);
        }
        if (!array_key_exists($type, $this->_tableMetadata[$rawName])) {
            $this->_tableMetadata[$rawName][$type] = $this->{'loadTable' . ucfirst($type)}($rawName);
            $this->saveTableMetadataToCache($cache, $rawName);
        }

        return $this->_tableMetadata[$rawName][$type];
    }

thank you very much!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating getTableMetadata and the profiler code that calculates inclusive wall time and aggregates child functions. Compare the reported parent and child timings using the attached example and trace data. Done means establishing whether the discrepancy is expected or identifying a concrete timing-calculation defect.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
observability, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.