You are here

public function MongodbXHProfRuns::get_run in XHProf 8

Same name and namespace in other branches
  1. 6 modules/xhprof_mongodb/MongodbXHProfRuns.inc \MongodbXHProfRuns::get_run()
  2. 7 modules/xhprof_mongodb/MongodbXHProfRuns.inc \MongodbXHProfRuns::get_run()

File

modules/xhprof_mongodb/MongodbXHProfRuns.inc, line 70
Definition of MongodbXHProfRuns.

Class

MongodbXHProfRuns
Defines a MongoDB storage backend for XHProf.

Code

public function get_run($run_id, $type, &$run_desc) {
  $collection = mongodb_collection('xhprof');
  $run_desc = "XHProf Run (Namespace={$type})";
  $run = $collection
    ->findOne([
    '_id' => (string) $run_id,
  ]);
  return $run['run_data'];
}