当前位置: 首页>>代码示例>>PHP>>正文


PHP Debugbar::stopMeasure方法代码示例

本文整理汇总了PHP中Debugbar::stopMeasure方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugbar::stopMeasure方法的具体用法?PHP Debugbar::stopMeasure怎么用?PHP Debugbar::stopMeasure使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Debugbar的用法示例。


在下文中一共展示了Debugbar::stopMeasure方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: view

 protected function view($view = null, $data = array(), $mergeData = array())
 {
     if (array_search('Barryvdh\\Debugbar\\LaravelDebugbar', get_declared_classes()) !== FALSE) {
         \Debugbar::startMeasure('admin_view', 'Admin view generation');
     }
     $this->loadBaseComposer();
     $content = view($view, array_merge($data, ['_ctrl' => $this]), $mergeData)->render();
     $content = view('admin::layout.base', ['content' => $content, '_ctrl' => $this]);
     if (array_search('Barryvdh\\Debugbar\\LaravelDebugbar', get_declared_classes()) !== FALSE) {
         \Debugbar::stopMeasure('admin_view');
     }
     return $content;
 }
开发者ID:hpolthof,项目名称:admin,代码行数:13,代码来源:AdminController.php

示例2: showArticle

 public function showArticle($id)
 {
     Debugbar::startMeasure('load data', '载入文章数据');
     $article = new Article($id);
     try {
         $article->load();
     } catch (Exception $ex) {
         return View::make('error/custom', array('error' => $ex->getMessage()));
     }
     Debugbar::stopMeasure('load data');
     Debugbar::startMeasure('render article', '渲染');
     $view = View::make('site/article/view', array('article' => $article->data, 'needRefresh' => $article->needRefresh()));
     Debugbar::stopMeasure('render article');
     return $view;
 }
开发者ID:undownding,项目名称:cnBeta1,代码行数:15,代码来源:ArticleController.php

示例3: parseItem

 /**
  * @param $itemInfo
  * @return Item
  */
 public function parseItem($itemInfo)
 {
     if (empty($itemInfo) || !is_array($itemInfo)) {
         throw new \InvalidArgumentException('ItemInfo should be filled array!');
     }
     $key = md5(json_encode($itemInfo));
     if (isset(self::$itemCache[$key]) && !empty(self::$itemCache[$key])) {
         return self::$itemCache[$key];
     }
     \Debugbar::startMeasure('parseItem', 'Парсим предмет ' . $itemInfo['name']);
     /** @var Item $item */
     $item = ItemStorage::createItem($itemInfo);
     if ($itemInfo['tradable'] !== '0') {
         try {
             /** @var $price ItemPrice */
             $price = $this->priceHelper->getItemPrice($item);
             $item->setPrice($price);
         } catch (\Exception $e) {
             \Log::debug($e->getMessage());
         }
     }
     \Debugbar::stopMeasure('parseItem');
     return $item;
 }
开发者ID:enizunic93,项目名称:SteamLotterry,代码行数:28,代码来源:ItemCollectionParser.php

示例4: function

<?php

use App\User;
Route::group(['middleware' => ['web']], function () {
    Route::get('testSendEmail1', 'ContactEmailController@sendEmail');
    Route::get('/testSendEmail2', function (User $user) {
        //Profiling
        Debugbar::startMeasure("SendSubscriptionEmail");
        dispatch(new \App\Jobs\SendSubscriptionEmail($user));
        Debugbar::stopMeasure("SendSubscriptionEmail");
        return 'Done!';
    });
    //    Deprecated in 5.2:
    //    Route::controller()
    Route::get('pricingtables/usecase1', 'PricingTableController@index');
    Route::get('pricingtables/usecase2', 'PricingTableController@index2');
});
开发者ID:YvesNavarro,项目名称:solid_laravel,代码行数:17,代码来源:test-routes.php

示例5: SearchTourOptions

 function SearchTourOptions()
 {
     $env = env('TAG_OPTION', 'static');
     /////////////////
     // Location    //
     /////////////////
     if (str_is('dynamic', $env)) {
         $data = API::GetDestinationTags();
         $destination = [];
         foreach ($data as $key => $value) {
             $dest = explode('.', $value->tag);
             if (count($dest) > 2) {
                 if (isset($destination[strtolower($dest[count($dest) - 2])])) {
                     $destination[strtolower($dest[count($dest) - 2])][] = $dest[strtolower(count($dest) - 1)];
                 } else {
                     $new = [strtolower($dest[count($dest) - 2]) => [$dest[strtolower(count($dest) - 1)]]];
                     $destination = array_merge($destination, $new);
                 }
             } else {
                 if (isset($destination[strtolower($dest[0])])) {
                     $destination[strtolower($dest[0])][] = strtolower($dest[1]);
                 } else {
                     $new = [strtolower($dest[0]) => [strtolower($dest[1])]];
                     $destination = array_merge($destination, $new);
                 }
             }
         }
     } else {
         $destination['Indonesia'] = ['Aceh', 'Balikpapan', 'Bali', 'Bandung', 'Bangka', 'Banten', 'Belitung', 'Derawan', 'Flores', 'Jakarta', 'Jawa Tengah', 'Jawa Timur', 'Karimun Jawa', 'Kepulauan Riau', 'Lampung', 'Lombok', 'Makassar', 'Malang', 'Maluku', 'Manado', 'Medan', 'Nusa Tenggara Barat', 'Nusa Tenggara Timur', 'Padang', 'Pontianak', 'Pulau Seribu', 'Raja Ampat', 'Riau', 'Semarang', 'Solo', 'Surabaya', 'Wakatobi', 'Yogyakarta'];
         $destination['Asia'] = ['Arab Saudi', 'Brunei Darussalam', 'China', 'Filipina', 'India', 'Israel', 'Jepang', 'Kamboja', 'Kazakhstan', 'Kirgizstan', 'Korea Selatan', 'Laos', 'Malaysia', 'Myanmar', 'Republik Maladewa', 'Singapura', 'Taiwan', 'Thailand', 'Uni Emirat Arab', 'Uzbekistan', 'Vietnam'];
         $destination['Australia'] = ['Gold Coast', 'Melbourne', 'Perth', 'South Australia', 'Sydney'];
         $destination['Eropa'] = ['Austria', 'Armenia', 'Belanda', 'Belgia', 'Denmark', 'Finlandia', 'Georgia', 'Hongaria', 'Inggris', 'Italia', 'Jerman', 'Liechtenstein', 'Luxembourg', 'Monako', 'Norwegia', 'Perancis', 'Polandia', 'Portugal', 'Republik Ceko', 'Rusia', 'Skotlandia', 'Slovakia', 'Spanyol', 'Swedia', 'Swiss', 'Turki', 'Vatican'];
         $destination['Amerika'] = ['Kanada', 'USA'];
         $destination['Oceania'] = ['Hawaii', 'New Zealand'];
         $destination['Afrika'] = ['Kenya', 'Madagaskar', 'Maroko', 'Mesir', 'South Afrika', 'Yordania'];
     }
     $destination_options[] = "Semua Tujuan";
     foreach ($destination as $k => $v) {
         $destination_options[$k] = $k;
         foreach ($v as $v2) {
             $destination_options[strtolower($v2)] = '&nbsp;&nbsp;&nbsp;&nbsp;' . $v2;
         }
     }
     ////////////
     // harga //
     ////////////
     $harga[''] = 'Semua harga';
     $harga['1-1000000'] = 'Di bawah Rp. 1.000.000';
     $harga['1000000-2500000'] = 'Rp. 1.000.000 - Rp. 2.500.000';
     $harga['2500000-5000000'] = 'Rp. 2.500.000 - Rp. 5.000.000';
     $harga['5000000-10000000'] = 'Rp. 5.000.000 - Rp. 10.000.000';
     $harga['10000000-20000000'] = 'Rp. 10.000.000 - Rp. 20.000.000';
     $harga['20000000'] = 'Rp. 20.000.000 ke atas';
     ///////////
     // Waktu //
     ///////////
     $period[] = 'Kapanpun';
     for ($i = 0; $i <= 12; $i++) {
         $period[\Carbon\Carbon::parse('first day of this month')->addMonth($i)->format('m-Y')] = \Carbon\Carbon::parse('first day of this month')->addMonth($i)->format('M Y');
     }
     //////////////////
     // Travel Agent //
     //////////////////
     \Debugbar::startMeasure('API: travel_agents', 'API: travel_agents');
     $tmp = json_decode($this->api->get($this->api_url . '/travel_agents?access_token=' . Session::get('access_token'))->getBody());
     \Debugbar::stopMeasure('API: travel_agents');
     $travel_agents[] = "Semua Travel Agent";
     foreach ($tmp->data->data as $travel_agent) {
         $travel_agents[strtoupper(substr($travel_agent->name, 0, 1))][$travel_agent->slug] = str_limit($travel_agent->name, 30);
         $this->travel_agent_ids[$travel_agent->slug] = $travel_agent->_id;
     }
     //////////////
     // Interest //
     //////////////
     \Debugbar::startMeasure('API: tag', 'API: tag');
     $tmp = json_decode($this->api->get($this->api_url . '/tags?type=interest&access_token=' . Session::get('access_token'))->getBody());
     \Debugbar::stopMeasure('API: tag');
     $interest = $tmp->data->data;
     //////////////////////////
     // Assign to global var //
     //////////////////////////
     $this->search_tour_options['destinations'] = $destination_options;
     $this->search_tour_options['harga'] = $harga;
     $this->search_tour_options['period'] = $period;
     $this->search_tour_options['travel_agents'] = $travel_agents;
     $this->search_tour_options['interest'] = $interest;
 }
开发者ID:erickmo,项目名称:capcusv3,代码行数:87,代码来源:Controller.php

示例6: stop

 /**
  * For Debugbar stop measure method
  */
 function stop($name = 'Custom vendor')
 {
     return Debugbar::stopMeasure($name);
 }
开发者ID:sharenjoy,项目名称:cmsharenjoy,代码行数:7,代码来源:helpers.php

示例7: function

<?php

use App\User;
Route::group(['middleware' => ['web', 'pjax']], function () {
    //Route::get('testSendEmail', 'ContactEmailController@sendEmail');
    // Alternativa
    Route::get('/testSendEmail', function (User $user) {
        Debugbar::startMeasure('SendSubscriptionEmail');
        dispatch(new \App\Jobs\SendSubscriptionEmail($user));
        Debugbar::stopMeasure('SendSubscriptionEmail');
        return 'Done!';
    });
});
开发者ID:maksymkhar,项目名称:SolidLaravel,代码行数:13,代码来源:test-routes.php

示例8: GetLatestArticles

 static function GetLatestArticles($skip, $take = 1)
 {
     Static::init();
     $query['skip'] = max(0, $skip);
     $query['take'] = max(1, $take);
     $query['mode'] = 'latest_published';
     $query['with_count'] = true;
     \Debugbar::startMeasure('API: Article', 'API: Article');
     $api_response = Cache::remember('lastest_articles_' . $query['skip'] . '_' . $query['take'], 20, function () use($query) {
         return json_decode(self::$api->get(self::$api_url . '/articles?' . http_build_query(array_merge($query, ['access_token' => Session::get('access_token')])))->getBody(), false);
     });
     \Debugbar::stopMeasure('API: Article');
     $data_count = $api_response->data->count;
     $latest_articles = $api_response->data->data;
     $latest_articles = API::reformat_images($latest_articles);
     return ['count' => $data_count, 'data' => $latest_articles];
 }
开发者ID:erickmo,项目名称:capcusv3,代码行数:17,代码来源:API.php

示例9: function

| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/login', ['as' => 'auth.login', 'uses' => 'LoginController@getLogin']);
Route::post('/postLogin', ['as' => 'auth.postLogin', 'uses' => 'LoginController@postLogin']);
Route::get('/', function () {
    return view('welcome');
});
Route::get('/home', ['as' => 'auth.home', function () {
    return view('home');
}]);
Route::get('/', function () {
    \Debugbar::startMeasure("resource");
    $authenticated = false;
    Session::set('authenticated', false);
    // dd (Session::all());
    // \Debugbar::info("Xivato1!!!");
    //\Debugbar::info(Session::all());
    if (Session::has('authenticated')) {
        if (Session::get('authenticated') == true) {
            $authenticated = true;
        }
    }
    if ($authenticated) {
        \Debugbar::stopMeasure("resource");
        return view('resource');
    } else {
        return view('login');
    }
});
开发者ID:sergipineda,项目名称:Auth,代码行数:31,代码来源:routes.php

示例10: stop_profile

 /**
  * Stop the profile for debugging.
  *
  * @param string $name
  */
 function stop_profile($name)
 {
     if (config('debugbar.enabled', false)) {
         Debugbar::stopMeasure($name);
     }
 }
开发者ID:sunel,项目名称:laravel-layout,代码行数:11,代码来源:helpers.php


注:本文中的Debugbar::stopMeasure方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。