פרופילינג בעזרת Firebug
Zend_Db_Profiler_Firebug שולח מידע פרופילינג ל Firebug Console.
כל המידע נשלח באמצעות רכיב ה Zend_Wildfire_Channel_HttpHeaders אשר משתמש בכותרי HTTP כדי לוודא שתוכן העמוד לא משובש.
ניפוי בקשות AJAX אשר דורשות תגובות XML ו JSON אפשרי בשיטה זו.
דרישות:
דפדפן פיירפוקס גרסא 3 למרות שגרסא 2 גם נתמכת
תוסף ה Firebug לפיירפוקס אשר ניתן להורדה דרך https://addons.mozilla.org/en-US/firefox/addon/1843.
תוסף ה FirePHP לפיירפוקס אשר ניתן להורדה דרך https://addons.mozilla.org/en-US/firefox/addon/6149.
פרופילינג מסד נתונים בעזרת Zend_Controller_Front
setEnabled(true);
// Attach the profiler to your db adapter
$db->setProfiler($profiler)
// Dispatch your front controller
// All DB queries in your model, view and controller
// files will now be profiled and sent to Firebug
]]>
פרופילינג מסד נתונים ללא שימוש ב Zend_Controller_Front
setEnabled(true);
// Attach the profiler to your db adapter
$db->setProfiler($profiler)
$request = new Zend_Controller_Request_Http();
$response = new Zend_Controller_Response_Http();
$channel = Zend_Wildfire_Channel_HttpHeaders::getInstance();
$channel->setRequest($request);
$channel->setResponse($response);
// Start output buffering
ob_start();
// Now you can run your DB queries to be profiled
// Flush profiling data to browser
$channel->flush();
$response->sendHeaders();
]]>