Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Germann <ugermann@inf.ed.ac.uk>2015-05-11 02:32:20 +0300
committerUlrich Germann <ugermann@inf.ed.ac.uk>2015-05-11 02:32:20 +0300
commit1778238d73dcb328a145d7c9320254a5552d0711 (patch)
tree5afeb89bf6845c0af5ba043183310b659857af8c
parent8a174beb44eb73d3134186b7551dd75efae01cdc (diff)
Logging of latency of bias lookup via server.
-rw-r--r--moses/TranslationModel/UG/mm/ug_sampling_bias.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/moses/TranslationModel/UG/mm/ug_sampling_bias.cc b/moses/TranslationModel/UG/mm/ug_sampling_bias.cc
index 95b93ec7b..ebe1ce91d 100644
--- a/moses/TranslationModel/UG/mm/ug_sampling_bias.cc
+++ b/moses/TranslationModel/UG/mm/ug_sampling_bias.cc
@@ -1,6 +1,7 @@
#include "ug_sampling_bias.h"
#include <iostream>
#include <boost/foreach.hpp>
+#include "moses/Timer.h"
#ifdef HAVE_CURLPP
#include <curlpp/Options.hpp>
@@ -40,8 +41,11 @@ namespace Moses
, m_bias(docname2docid.size(), 0)
{
#ifdef HAVE_CURLPP
+ Timer timer;
+ if (log) timer.start(NULL);
std::string json = query_bias_server(server_url, text);
init_from_json(json, docname2docid, log);
+ if (log) *log << "Bias query took " << timer << " seconds." << std::endl;
#endif
}