Log support tree creation time
This commit is contained in:
parent
44bc8d8f5f
commit
7eb5ca7396
1 changed files with 11 additions and 0 deletions
|
@ -18,6 +18,8 @@
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
#include <libslic3r/I18N.hpp>
|
#include <libslic3r/I18N.hpp>
|
||||||
|
|
||||||
|
#include <libnest2d/tools/benchmark.h>
|
||||||
|
|
||||||
//! macro used to mark string used at localization,
|
//! macro used to mark string used at localization,
|
||||||
//! return same string
|
//! return same string
|
||||||
#define L(s) Slic3r::I18N::translate(s)
|
#define L(s) Slic3r::I18N::translate(s)
|
||||||
|
@ -30,6 +32,9 @@ indexed_triangle_set create_support_tree(const SupportableMesh &sm,
|
||||||
auto builder = make_unique<SupportTreeBuilder>(ctl);
|
auto builder = make_unique<SupportTreeBuilder>(ctl);
|
||||||
|
|
||||||
if (sm.cfg.enabled) {
|
if (sm.cfg.enabled) {
|
||||||
|
Benchmark bench;
|
||||||
|
bench.start();
|
||||||
|
|
||||||
switch (sm.cfg.tree_type) {
|
switch (sm.cfg.tree_type) {
|
||||||
case SupportTreeType::Default: {
|
case SupportTreeType::Default: {
|
||||||
create_default_tree(*builder, sm);
|
create_default_tree(*builder, sm);
|
||||||
|
@ -45,6 +50,12 @@ indexed_triangle_set create_support_tree(const SupportableMesh &sm,
|
||||||
default:;
|
default:;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bench.stop();
|
||||||
|
|
||||||
|
BOOST_LOG_TRIVIAL(info) << "Support tree creation took: "
|
||||||
|
<< bench.getElapsedSec()
|
||||||
|
<< " seconds";
|
||||||
|
|
||||||
builder->merge_and_cleanup(); // clean metadata, leave only the meshes.
|
builder->merge_and_cleanup(); // clean metadata, leave only the meshes.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue