Ejemplo n.º 1
0
 /**
  * Returns an array containing tabular data describing all the duration metrics
  * for APIs.  The array is a flat list, with each internal element of the list being
  * an associative array with keys: key, count, min, max, avg. The "key" value
  * is the name of the API method; the remaining values are the duration
  * metrics for that API. Note that this follows the convention of returning
  * a top-most associative array with a single element keyed with 'api_duration'. That
  * element value is the flat array described above.
  *
  * @return array all API duration metrics.
  */
 public function execute()
 {
     $_listener = M3_Event_DispatcherFactory::createApiInvocationListener();
     $_stats = $_listener->getApiDurations();
     $_arr = $_stats->getStatsFlatArray();
     // we want it flat so the response can be described via XML Schema
     return array('api_duration' => $_arr);
 }
Ejemplo n.º 2
0
 public function execute()
 {
     $_listener = M3_Event_DispatcherFactory::createApiInvocationListener();
     $_results = $_listener->deleteAllData();
     return $_results;
 }