perftools / perftools/xhgui

URL View of Graph Displays Single Point

Open
#88 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hello, great product but may have stumbled across an issue. I did a straight clone of the repo and set up the app on my service, and I have several domains, all with the same app, feeding mongodb. I changed the header.php file in the externals folder so that URL gets the $_SERVER['SERVER_NAME'] along with the $uri instead of just the $uri.

Well, the data is being populated as expected, however the problem I'm running into is that the charts on the url view are not rendering properly. I get a chart with 2 points on the far left and that's it.

The JS data that the code is rendering to the page to graph looks like this

var graphData = [{"row_count":6,"raw_index":5.4,"date":"2014-01-17","wt":237285,"cpu":36003,"mu":2259360,"pmu":4168944}];

and the result from the mongodb aggregate function within getPercentileForUrl returns,

Array
(
    [result] => Array
        (
            [0] => Array
                (
                    [_id] => 2014-01-17
                    [row_count] => 6
                    [wall_times] => Array
                        (
                            [0] => 223810
                            [1] => 237285
                            [2] => 191848
                            [3] => 233181
                            [4] => 228890
                            [5] => 243629
                        )

                    [cpu_times] => Array
                        (
                            [0] => 36002
                            [1] => 36002
                            [2] => 28001
                            [3] => 36003
                            [4] => 36002
                            [5] => 44002
                        )

                    [mu_times] => Array
                        (
                            [0] => 2298520
                            [1] => 2259360
                            [2] => 2256872
                            [3] => 2255672
                            [4] => 2179600
                            [5] => 2227840
                        )

                    [pmu_times] => Array
                        (
                            [0] => 4168896
                            [1] => 4168944
                            [2] => 4168896
                            [3] => 4168896
                            [4] => 4168944
                            [5] => 4166640
                        )

                    [raw_index] => 5.4
                )

        )

    [ok] => 1
)

As a side note, I also had to comment out the ENV variable because I was getting errors from mongo stating unable to store empty value error consistently from the header.php file.

Thanks

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

Reproduce the URL view with the multi-domain setup, then inspect externals/header.php, getPercentileForUrl, and the JavaScript that builds graphData. Compare the MongoDB aggregate result with the rendered chart and verify that the URL view displays all expected points without the empty-value errors mentioned in header.php.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb, php
Domain
databases, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.