Closed liangmingran closed 6 years ago
if you mongo version >3.5 , you will see the error in Recent runs pages by clicking an url link
the 'cursor' option is required, except for aggregation explain
fix it by modify /path/xhgui/src/Xhgui/Profiles.php
$this->_collection->aggregate(array( array('$match' => $match), array( '$project' => array( 'date' => $col, 'profile.main()' => 1 ) ), array( '$group' => array( '_id' => '$date', 'row_count' => array('$sum' => 1), 'wall_times' => array('$push' => '$profile.main().wt'), 'cpu_times' => array('$push' => '$profile.main().cpu'), 'mu_times' => array('$push' => '$profile.main().mu'), 'pmu_times' => array('$push' => '$profile.main().pmu'), ) ), array( '$project' => array( 'date' => '$date', 'row_count' => '$row_count', 'raw_index' => array( '$multiply' => array( '$row_count', $percentile / 100 ) ), 'wall_times' => '$wall_times', 'cpu_times' => '$cpu_times', 'mu_times' => '$mu_times', 'pmu_times' => '$pmu_times', ) ), array('$sort' => array('_id' => 1)), ),array('cursor' => array('batchSize' => 0)));
Any chance you could send a pull request for this fix? I don't use mongo > 3.5.
Hi,
I've added a pull request #228 for this to patch, based on @liangmingran informations
Thanks @skors
if you mongo version >3.5 , you will see the error in Recent runs pages by clicking an url link
fix it by modify /path/xhgui/src/Xhgui/Profiles.php