xhgui
xhgui copied to clipboard
URL View of Graph Displays Single Point
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
I know that the URL view graphs have never handled a single point of data well. I should really fix it, thanks for reporting the issue.
Well, the problem isn't necessarily that, I have a 6 for the row_count, however it treats it as though its 1 result. I was also getting this error when trying to store the $_ENV data,
[Fri Jan 17 11:12:04 2014] [error] [client 192.168.1.44] xhgui - zero-length keys are not allowed, did you use $ with double quotes?
then after allowing zerolength keys in php, i got this error.
[Fri Jan 17 11:32:26 2014] [error] [client 192.168.1.44] xhgui - '\0' not allowed in key: \0...
After commenting out 'env' => $_ENV, everything started working.
If it helps at all, I used Symfony autoloaders in my application.
It looks like the issue was I needed to change the search criteria to the last 30 minutes.
By default the chart defaults to day view, and groups results by day. You can modify the range below a day and the results will not be grouped anymore.
The URL view now has the ability to get smaller time frames and ungrouped results. Does that help solve this issue.
I had the same confusion. Perhaps adding a label to the x-axis would make the grouping more obvious?
Even when I do a search for last 24 hours, the first and last data points are not marked, which is confusing for small data sets.