WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

cumulative counts are off  #78

@dadamssg

Description

@dadamssg

I'm running this within a php 8.1 alpine docker image and noticed that the cumulative counts are way off.

image

I'm using the Profiler::PROFILER_TIDEWAYS_XHPROF profiler.

        $builtIns = (int) ($_GET['xhprof_builtins'] ?? 0);

        $flags = [
            ProfilingFlags::CPU,
            ProfilingFlags::MEMORY,
            ProfilingFlags::NO_SPANS,
            ProfilingFlags::NO_BUILTINS
        ];

        if ($builtIns === 1) {
            unset($flags[3]);
        }

        $profiler = new \Xhgui\Profiler\Profiler([
            'profiler' => Profiler::PROFILER_TIDEWAYS_XHPROF,
            'profiler.enable' => function () {
                $queryToken = $_ENV['XHPROF_QUERY_TOKEN'] ?? null;
                $incomingToken = $_GET['xhprof'] ?? null;
                return !empty($queryToken) && $incomingToken === $queryToken;
            },
            'profiler.flags' => $flags,
            'save.handler' => \Xhgui\Profiler\Profiler::SAVER_UPLOAD,
            'save.handler.upload' => array(
                'url' => $_ENV['XHGUI_HOST'] . '/run/import',
                'timeout' => 3,
                'token' => $_ENV['XHGUI_UPLOAD_TOKEN'],
            ),
        ]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions