Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
5baa6acc
Commit
5baa6acc
authored
Dec 07, 2018
by
Simon Spannagel
Browse files
ModManager: improve printout for millions of events/tracks
parent
4b3fe883
Pipeline
#622996
passed with stages
in 10 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core/module/ModuleManager.cpp
View file @
5baa6acc
...
...
@@ -611,9 +611,17 @@ void ModuleManager::run() {
m_tracks
+=
(
tracks
==
nullptr
?
0
:
static_cast
<
int
>
(
tracks
->
size
()));
if
(
m_events
%
100
==
0
)
{
auto
kilo_or_mega
=
[](
const
double
&
input
)
{
bool
mega
=
(
input
>
1e6
?
true
:
false
);
auto
value
=
(
mega
?
input
*
1e-6
:
input
*
1e-3
);
std
::
stringstream
output
;
output
<<
std
::
fixed
<<
std
::
setprecision
(
mega
?
2
:
1
)
<<
value
<<
(
mega
?
"M"
:
"k"
);
return
output
.
str
();
};
LOG_PROGRESS
(
STATUS
,
"event_loop"
)
<<
"Ev: "
<<
std
::
fixed
<<
std
::
setprecision
(
1
)
<<
0.001
*
m_events
<<
"k Tr: "
<<
std
::
fixed
<<
std
::
setprecision
(
1
)
<<
0.001
*
m_tracks
<<
"k ("
<<
std
::
setprecision
(
3
)
<<
"Ev: "
<<
kilo_or_mega
(
m_events
)
<<
" Tr: "
<<
kilo_or_mega
(
m_tracks
)
<<
" ("
<<
std
::
setprecision
(
3
)
<<
(
static_cast
<
double
>
(
m_tracks
)
/
m_events
)
<<
"/ev)"
<<
(
m_clipboard
->
has_persistent
(
"eventStart"
)
?
" t = "
+
Units
::
display
(
m_clipboard
->
get_persistent
(
"eventStart"
),
{
"ns"
,
"us"
,
"ms"
,
"s"
})
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment