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


PHP Timer::stopAsString方法代码示例

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


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

示例1: _odbc_sparul_delete_language

    private function _odbc_sparul_delete_language($graphURI, $languageProperties)
    {
        //***********************
        //LANGUAGE
        //***********************
        //delete all triples with the current subject
        //where the lang properties with string object
        //from other language version are given, which should stay
        $x = 0;
        Timer::start('LiveUpdateDestination::_odbc_sparul_delete_english_total');
        foreach ($languageProperties as $one) {
            $u = new URI($one, false);
            $sparul = 'DELETE FROM  <' . $graphURI . '>
{ ' . $this->subjectSPARULpattern . ' ' . $u->toSPARULPattern() . ' ?o }
FROM  <' . $graphURI . '>
WHERE {
    ' . $this->subjectSPARULpattern . ' ' . $u->toSPARULPattern() . ' ?o .
    FILTER ( lang(?o) = \'en\').
}';
            Timer::start('LiveUpdateDestination::_odbc_sparul_delete_english' . $x);
            if ($this->_odbc_sparul_execute($sparul)) {
                $this->counterDelete += 1;
            }
            Timer::stop('LiveUpdateDestination::_odbc_sparul_delete_english' . $x);
            $x++;
        }
        //end foreach
        $needed = Timer::stopAsString('LiveUpdateDestination::_odbc_sparul_delete_english_total');
        $this->log(DEBUG, 'deleted language' . $needed);
        //TESTS>>>>>>>>>>>>
        if (Options::getOption('debug_run_tests')) {
            $this->log(INFO, 'no test for language currently');
        }
        //TESTS<<<<<<<<<<<
    }
开发者ID:nsystem1,项目名称:ZeeJong,代码行数:35,代码来源:LiveUpdateDestination_full_alternatives.php

示例2: _odbc_clean_sparul_delete_subresources

    private function _odbc_clean_sparul_delete_subresources($log = '')
    {
        $subject = $this->uri->getURI();
        $sparul = 'DELETE  FROM <' . $this->graphURI . '>
    { ?subresource ?p  ?o .  }
FROM <' . $this->graphURI . '>
';
        $where = 'WHERE {
' . $this->subjectSPARULpattern . ' ?somep ?subresource .
?subresource ?p  ?o .
FILTER (?subresource LIKE <' . $subject . '/%>)
}';
        $sparul .= $where;
        //TESTS>>>>>>>>>>>>
        if (Options::getOption('debug_run_tests')) {
            $countbefore = $this->_testwherepart($where);
        }
        Timer::start('LiveUpdateDestination::_odbc_clean_sparul_delete_subresources');
        if ($this->_odbc_sparul_execute($sparul)) {
            $this->counterDelete += 1;
        }
        $needed = Timer::stopAsString('LiveUpdateDestination::_odbc_clean_sparul_delete_subresources');
        $this->log(DEBUG, 'deleted subresources, needed ' . $needed);
        //TESTS>>>>>>>>>>>>
        if (Options::getOption('debug_run_tests')) {
            sleep(TEST_DELAY);
            $this->log(INFO, "delaying: " . TEST_DELAY);
            $countafter = $this->_testwherepart($where);
            $this->log(INFO, 'TEST delete_subResources, before: ' . $countbefore . ' after: ' . $countafter . ' triples');
            if ($countafter > 0 && $countbefore > 0) {
                $this->log(WARN, 'TEST FAILED, AFTER SHOULD BE 0');
                $this->log(WARN, "Test: " . $this->_testwhereQuery($where));
                $this->log(WARN, "Delete: " . $sparul);
            } else {
                $this->log(INFO, 'SUCCESS');
            }
        }
        //TESTS<<<<<<<<<<<<
    }
开发者ID:nsystem1,项目名称:ZeeJong,代码行数:39,代码来源:LiveUpdateDestination.php

示例3: insertIntoDB

    public function insertIntoDB()
    {
        if (!$this->active) {
            return;
        }
        Timer::start('Hash::insertIntoDB');
        $json = json_encode($this->newJSONObject);
        $sql = 'Insert Into ' . TABLENAME . '  
(' . FIELD_OAIID . ', ' . FIELD_RESOURCE . ' , ' . FIELD_JSON_BLOB . ' ) 
Values ( ?, ? , ?  ) ';
        $stmt = $this->odbc->prepare($sql, 'Hash::insertIntoDB');
        $odbc_result = odbc_execute($stmt, array($this->oaiId, $this->subject, $json));
        $needed = Timer::stopAsString('Hash::insertIntoDB');
        if ($odbc_result == false) {
            $this->log(WARN, 'FAIL insert hashes for ' . count($this->newJSONObject) . ' extractors');
        } else {
            $this->log(DEBUG, $this->subject . ' inserted hashes for ' . count($this->newJSONObject) . ' extractors ' . $needed);
            /*
            				foreach(odbc_fetch_array($odbc_result) as $one){
            					$this->log(DEBUG,$one);
            					}
            */
        }
    }
开发者ID:ljarray,项目名称:dbpedia,代码行数:24,代码来源:Hash.php


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