mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-29 06:52:34 +03:00
Time logging info
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3601 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
be8dbd20e9
commit
60db2a2971
@ -43,8 +43,10 @@ namespace MosesChart
|
|||||||
Manager::Manager(InputType const& source, const TranslationSystem* system)
|
Manager::Manager(InputType const& source, const TranslationSystem* system)
|
||||||
:m_source(source)
|
:m_source(source)
|
||||||
,m_hypoStackColl(source, *this)
|
,m_hypoStackColl(source, *this)
|
||||||
,m_transOptColl(source, system, m_hypoStackColl),
|
,m_transOptColl(source, system, m_hypoStackColl)
|
||||||
m_system(system)
|
,m_system(system)
|
||||||
|
,m_start(clock())
|
||||||
|
|
||||||
{
|
{
|
||||||
m_system->InitializeBeforeSentenceProcessing(source);
|
m_system->InitializeBeforeSentenceProcessing(source);
|
||||||
}
|
}
|
||||||
@ -52,6 +54,12 @@ Manager::Manager(InputType const& source, const TranslationSystem* system)
|
|||||||
Manager::~Manager()
|
Manager::~Manager()
|
||||||
{
|
{
|
||||||
m_system->CleanUpAfterSentenceProcessing();
|
m_system->CleanUpAfterSentenceProcessing();
|
||||||
|
|
||||||
|
clock_t end = clock();
|
||||||
|
float et = (end - m_start);
|
||||||
|
et /= (float)CLOCKS_PER_SEC;
|
||||||
|
VERBOSE(1, "Translation took " << et << " seconds" << endl);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Manager::ProcessSentence()
|
void Manager::ProcessSentence()
|
||||||
|
@ -45,7 +45,8 @@ protected:
|
|||||||
TranslationOptionCollection m_transOptColl; /**< pre-computed list of translation options for the phrases in this sentence */
|
TranslationOptionCollection m_transOptColl; /**< pre-computed list of translation options for the phrases in this sentence */
|
||||||
std::auto_ptr<Moses::SentenceStats> m_sentenceStats;
|
std::auto_ptr<Moses::SentenceStats> m_sentenceStats;
|
||||||
const Moses::TranslationSystem* m_system;
|
const Moses::TranslationSystem* m_system;
|
||||||
|
clock_t m_start; /**< starting time, used for logging */
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Manager(Moses::InputType const& source, const Moses::TranslationSystem* system);
|
Manager(Moses::InputType const& source, const Moses::TranslationSystem* system);
|
||||||
~Manager();
|
~Manager();
|
||||||
|
Loading…
Reference in New Issue
Block a user