Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Marian Stahl
Gaudi
Commits
f81707b6
Commit
f81707b6
authored
May 13, 2019
by
mstahl
Browse files
hacked TimelineSvc to spit out a manageable csv file
parent
b80b6328
Pipeline
#856548
failed with stages
in 17 minutes and 40 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
GaudiHive/src/TimelineSvc.cpp
View file @
f81707b6
...
...
@@ -3,6 +3,7 @@
#include "GaudiKernel/StatusCode.h"
#include <fstream>
#include <functional>
StatusCode
TimelineSvc
::
initialize
()
{
StatusCode
sc
=
Service
::
initialize
();
...
...
@@ -66,8 +67,10 @@ ITimelineSvc::TimelineRecorder TimelineSvc::getRecorder( std::string alg, const
bool
TimelineSvc
::
getTimelineEvent
(
TimelineEvent
&
e
)
const
{
for
(
const
auto
&
candidate
:
m_events
)
{
if
(
candidate
.
algorithm
==
e
.
algorithm
&&
candidate
.
event
==
e
.
event
)
{
e
=
candidate
;
return
true
;
if
(
e
.
event
%
m_receverynthevent
==
0
&&
(
m_algos
.
empty
()
||
std
::
find
(
m_algos
.
begin
(),
m_algos
.
end
(),
e
.
algorithm
)
!=
m_algos
.
end
())){
e
=
candidate
;
return
true
;
}
}
}
return
false
;
...
...
@@ -78,11 +81,11 @@ void TimelineSvc::outputTimeline() {
out
<<
"#start end algorithm thread slot event"
<<
std
::
endl
;
for
(
const
auto
&
e
:
m_events
)
{
out
<<
std
::
chrono
::
duration_cast
<
std
::
chrono
::
nanoseconds
>
(
e
.
start
.
time_since_epoch
()
).
count
()
<<
" "
<<
std
::
chrono
::
duration_cast
<
std
::
chrono
::
nan
oseconds
>
(
e
.
end
.
time_since_epoch
()
).
count
()
<<
" "
<<
e
.
algorithm
<<
" "
<<
e
.
thread
<<
" "
<<
e
.
slot
<<
" "
<<
e
.
event
<<
std
::
endl
;
}
for
(
const
auto
&
e
:
m_events
)
if
(
e
.
event
%
m_receverynthevent
==
0
&&
(
m_algos
.
empty
()
||
std
::
find
(
m_algos
.
begin
(),
m_algos
.
end
(),
e
.
algorithm
)
!=
m_algos
.
end
()))
out
<<
std
::
chrono
::
duration_cast
<
std
::
chrono
::
micr
oseconds
>
(
e
.
start
.
time_since_epoch
()
).
count
()
<<
" "
<<
std
::
chrono
::
duration_cast
<
std
::
chrono
::
microseconds
>
(
e
.
end
.
time_since_epoch
()
).
count
()
<<
" "
<<
e
.
algorithm
<<
" "
<<
e
.
thread
<<
" "
<<
e
.
slot
<<
" "
<<
e
.
event
<<
std
::
endl
;
out
.
close
();
}
...
...
GaudiHive/src/TimelineSvc.h
View file @
f81707b6
...
...
@@ -25,10 +25,12 @@ public:
private:
void
outputTimeline
();
Gaudi
::
Property
<
std
::
string
>
m_timelineFile
{
this
,
"TimelineFile"
,
"timeline.csv"
,
""
};
Gaudi
::
Property
<
bool
>
m_isEnabled
{
this
,
"RecordTimeline"
,
false
,
"Enable recording of the timeline events"
};
Gaudi
::
Property
<
bool
>
m_dumpTimeline
{
this
,
"DumpTimeline"
,
false
,
"Enable dumping of the timeline events"
};
Gaudi
::
Property
<
bool
>
m_partial
{
this
,
"Partial"
,
false
,
""
};
Gaudi
::
Property
<
std
::
string
>
m_timelineFile
{
this
,
"TimelineFile"
,
"timeline.csv"
,
""
};
Gaudi
::
Property
<
bool
>
m_isEnabled
{
this
,
"RecordTimeline"
,
false
,
"Enable recording of the timeline events"
};
Gaudi
::
Property
<
bool
>
m_dumpTimeline
{
this
,
"DumpTimeline"
,
false
,
"Enable dumping of the timeline events"
};
Gaudi
::
Property
<
int
>
m_receverynthevent
{
this
,
"RecordEveryNthEntry"
,
1
,
"Only record every nth event"
};
Gaudi
::
Property
<
std
::
vector
<
std
::
string
>>
m_algos
{
this
,
"RecordedAlgorithms"
,
std
::
vector
<
std
::
string
>
{},
"Whitelist of algorithms"
};
Gaudi
::
Property
<
bool
>
m_partial
{
this
,
"Partial"
,
false
,
""
};
tbb
::
concurrent_vector
<
TimelineEvent
>
m_events
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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