Skip to content

Commit

Permalink
(#268) Правки по тестам Ани
Browse files Browse the repository at this point in the history
  • Loading branch information
TonitaN committed Nov 10, 2023
1 parent 554323b commit 5adf766
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/Logger/src/LogTemplate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ string LogTemplate::math_mode(string str) {

int step_size(int maxscale, size_t objsize, size_t datasize) {
int step = std::ceil((maxscale * (static_cast<int>(objsize) + 3)) / max(static_cast<int>(datasize) - 2, 1));
return (step > 10 ? std::floor(step / 10) * 10 : step);
return (step > 10 ? std::floor(step / 10) * 10 : max(step, 1));
}

string LogTemplate::log_plot(Plot p) {
Expand Down
2 changes: 1 addition & 1 deletion libs/Tester/src/Tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void Tester::test(const ParseDevice& lang, const Regex& regex, int step, iLogTem
plot.data.push_back(make_pair(make_pair(words[i], int(steps[i])), labels[type]));
}
}
t.columns.push_back("Количество итераций");
t.columns.push_back("Шаги");
t.columns.push_back("Длина строки");
t.columns.push_back("Время парсинга");
t.columns.push_back("Принадлежность языку");
Expand Down
2 changes: 2 additions & 0 deletions resources/template/Test1.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ \section{Test}

%template_table

%template_plot

\end{frame}
2 changes: 2 additions & 0 deletions resources/template/Test2.tex
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ \section{Test}

%template_table

%template_plot

\end{frame}

0 comments on commit 5adf766

Please sign in to comment.