calc time consumed in load_test

This commit is contained in:
wyy 2014-03-21 11:55:40 +08:00
parent 192bcf879a
commit 2b72d1cf91

View File

@ -1,4 +1,5 @@
#include <iostream>
#include <ctime>
#include <fstream>
#include "../src/Limonp/ArgvContext.hpp"
#include "../src/Limonp/io_functs.hpp"
@ -29,7 +30,6 @@ void cut(const ISegment * seg, const char * const filePath, size_t times = 10)
}
int main(int argc, char ** argv)
{
{
MixSegment seg("../dict/jieba.dict.utf8", "../dict/hmm_model.utf8");
if(!seg)
@ -37,7 +37,9 @@ int main(int argc, char ** argv)
cout<<"seg init failed."<<endl;
return EXIT_FAILURE;
}
long beginTime = clock();
cut(&seg, "../test/testdata/weicheng.utf8");
}
long endTime = clock();
printf("[%.3lf seconds]time consumeed.\n", double(endTime - beginTime)/CLOCKS_PER_SEC);
return EXIT_SUCCESS;
}