diff options
author | couriersud <couriersud@gmx.org> | 2019-04-28 23:55:01 +0200 |
---|---|---|
committer | couriersud <couriersud@gmx.org> | 2019-04-28 23:55:01 +0200 |
commit | 60bf6b5f17ecbe9993cd33b79cc6c8cf7e649034 (patch) | |
tree | 98c3505de762313cc8708e1d76b4229aabd592de | |
parent | 37bcde418856b012d63b8e14bf42e7d0e6d73dd4 (diff) |
netlist: fix include order and logging queue stats (nw)
-rw-r--r-- | src/lib/netlist/devices/nld_7448.cpp | 2 | ||||
-rw-r--r-- | src/lib/netlist/nl_base.cpp | 41 | ||||
-rw-r--r-- | src/lib/netlist/plib/putil.h | 6 |
3 files changed, 25 insertions, 24 deletions
diff --git a/src/lib/netlist/devices/nld_7448.cpp b/src/lib/netlist/devices/nld_7448.cpp index c74e8a42496..23daf983174 100644 --- a/src/lib/netlist/devices/nld_7448.cpp +++ b/src/lib/netlist/devices/nld_7448.cpp @@ -6,8 +6,8 @@ */ #include "nld_7448.h" -#include "nlid_truthtable.h" #include "nlid_system.h" +#include "nlid_truthtable.h" #include <array> diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp index 0806a59b015..b31b7b9ad16 100644 --- a/src/lib/netlist/nl_base.cpp +++ b/src/lib/netlist/nl_base.cpp @@ -470,32 +470,33 @@ void netlist_t::print_stats() const log().verbose("Total calls : {1:12} {2:12} {3:12}", total_count, total_time, total_time / static_cast<decltype(total_time)>(total_count)); - nperftime_t<true> overhead; - nperftime_t<true> test; + log().verbose("Total loop {1:15}", m_stat_mainloop()); + log().verbose("Total time {1:15}", total_time); + + /* Only one serialization should be counted in total time */ + /* But two are contained in m_stat_mainloop */ + if (!!USE_QUEUE_STATS) { - auto overhead_guard(overhead.guard()); - for (int j=0; j<100000;j++) + nperftime_t<true> overhead; + nperftime_t<true> test; { - auto test_guard(test.guard()); + auto overhead_guard(overhead.guard()); + for (int j=0; j<100000;j++) + { + auto test_guard(test.guard()); + } } - } - nperftime_t<true>::type total_overhead = overhead() - * static_cast<nperftime_t<true>::type>(total_count) - / static_cast<nperftime_t<true>::type>(200000); + nperftime_t<true>::type total_overhead = overhead() + * static_cast<nperftime_t<true>::type>(total_count) + / static_cast<nperftime_t<true>::type>(200000); - log().verbose("Queue Pushes {1:15}", m_queue.m_prof_call()); - log().verbose("Queue Moves {1:15}", m_queue.m_prof_sortmove()); - log().verbose("Queue Removes {1:15}", m_queue.m_prof_remove()); - log().verbose("Queue Retimes {1:15}", m_queue.m_prof_retime()); + log().verbose("Queue Pushes {1:15}", m_queue.m_prof_call()); + log().verbose("Queue Moves {1:15}", m_queue.m_prof_sortmove()); + log().verbose("Queue Removes {1:15}", m_queue.m_prof_remove()); + log().verbose("Queue Retimes {1:15}", m_queue.m_prof_retime()); + log().verbose(""); - log().verbose("Total loop {1:15}", m_stat_mainloop()); - /* Only one serialization should be counted in total time */ - /* But two are contained in m_stat_mainloop */ - log().verbose("Total devices {1:15}", total_time); - log().verbose(""); - if (USE_QUEUE_STATS) - { log().verbose("Take the next lines with a grain of salt. They depend on the measurement implementation."); log().verbose("Total overhead {1:15}", total_overhead); nperftime_t<true>::type overhead_per_pop = (m_stat_mainloop()-2*total_overhead - (total_time - total_overhead)) diff --git a/src/lib/netlist/plib/putil.h b/src/lib/netlist/plib/putil.h index 771588831e9..d738a459027 100644 --- a/src/lib/netlist/plib/putil.h +++ b/src/lib/netlist/plib/putil.h @@ -8,12 +8,12 @@ #ifndef PUTIL_H_ #define PUTIL_H_ -#include "pstring.h" #include "pexception.h" +#include "pstring.h" #include <algorithm> #include <initializer_list> -#include <vector> #include <sstream> +#include <vector> #define PSTRINGIFY_HELP(y) # y #define PSTRINGIFY(x) PSTRINGIFY_HELP(x) @@ -166,7 +166,7 @@ namespace plib ss.imbue(std::locale::classic()); ss << arg; long int len(ss.tellp()); - long double x(0.0); + auto x(constants<long double>::zero()); long int pos(0); if (ss >> x) { |