Improved debug output
This commit is contained in:
@@ -80,10 +80,10 @@ int main(int argc, char **argv) {
|
|||||||
durs.at(i) = wxGetLocalTimeMillis();
|
durs.at(i) = wxGetLocalTimeMillis();
|
||||||
generateCross(grid,all_words,trans_type,words_out);
|
generateCross(grid,all_words,trans_type,words_out);
|
||||||
if ( words_out.size() == 0 )
|
if ( words_out.size() == 0 )
|
||||||
wxPrintf(wxT("Error in creating #%i!\n"),i+1);
|
wxPrintf(wxT("Error in creating #%-2i!\n"),i+1);
|
||||||
durs.at(i) = wxGetLocalTimeMillis() - durs.at(i);
|
durs.at(i) = wxGetLocalTimeMillis() - durs.at(i);
|
||||||
if ( is_verbose )
|
if ( is_verbose )
|
||||||
wxPrintf(wxT("Time to generate #%i is ")
|
wxPrintf(wxT("Time to generate #%-2i is ")
|
||||||
+ durs.at(i).ToString() + wxT(" ms\n"), i+1);
|
+ durs.at(i).ToString() + wxT(" ms\n"), i+1);
|
||||||
}
|
}
|
||||||
wxLongLong tm_total = std::accumulate(durs.begin(),durs.end(), wxLongLong(0,0));
|
wxLongLong tm_total = std::accumulate(durs.begin(),durs.end(), wxLongLong(0,0));
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void readGrid(const wxString &path, GridType &grid){
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLogDebug(wxT("Прочитана сетка размером %d x %d"),
|
wxLogDebug(wxT("Grid with size %2d x %2d is readden"),
|
||||||
static_cast<int>(grid.size()), static_cast<int>(grid.at(0).size()));
|
static_cast<int>(grid.size()), static_cast<int>(grid.at(0).size()));
|
||||||
f.Close();
|
f.Close();
|
||||||
}
|
}
|
||||||
@@ -101,10 +101,8 @@ void generateAllWords(const DictType &dict, AllWordsType &words_out,
|
|||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
wxLogDebug(wxT("Printing list of sorted letters:"));
|
wxLogDebug(wxT("Printing list of sorted letters:"));
|
||||||
for (auto i: freqs_sorted)
|
|
||||||
wxLogDebug(wxString(i));
|
|
||||||
for (auto i: freqs)
|
for (auto i: freqs)
|
||||||
wxLogDebug(wxT("Freq of ") + wxString(i.first) + wxT(" is %d"), i.second);
|
wxLogDebug(wxT("Freq of ") + wxString(i.first) + wxT(" is %5d"), i.second);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Function returns -1 if this word is so bad to include to dict
|
// Function returns -1 if this word is so bad to include to dict
|
||||||
@@ -321,7 +319,7 @@ void generateCross(const GridType &grid, const AllWordsType &words,
|
|||||||
std::vector<WordInfo> winfos;
|
std::vector<WordInfo> winfos;
|
||||||
generateWordInfo(grid, winfos);
|
generateWordInfo(grid, winfos);
|
||||||
for (size_t i = 0; i < winfos.size(); ++i)
|
for (size_t i = 0; i < winfos.size(); ++i)
|
||||||
wxLogDebug(wxT("Word at (%d,%d) with len = %d and index = %d and dir = %d"),
|
wxLogDebug(wxT("Word at (%2d,%2d) with len = %2d and index = %2d and dir = %d"),
|
||||||
winfos.at(i).x,winfos.at(i).y,winfos.at(i).len, winfos.at(i).ind, int(winfos.at(i).direct));
|
winfos.at(i).x,winfos.at(i).y,winfos.at(i).len, winfos.at(i).ind, int(winfos.at(i).direct));
|
||||||
|
|
||||||
WorkGridType grid_work;
|
WorkGridType grid_work;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
./Debug/main.cpp.o ./Debug/fmain.cpp.o ./Debug/fsettings.cpp.o ./Debug/src_crossexport.cpp.o ./Debug/src_crossgen.cpp.o ./Debug/fbgui_fbgui.cpp.o
|
../Release/main.cpp.o ../Release/fmain.cpp.o ../Release/fsettings.cpp.o ../Release/src_crossexport.cpp.o ../Release/src_crossgen.cpp.o ../Release/fbgui_fbgui.cpp.o
|
||||||
|
|||||||
Reference in New Issue
Block a user