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
ensembl-gh-mirror
ensembl-hive
Commits
fd223969
Commit
fd223969
authored
Nov 06, 2012
by
Leo Gordon
Browse files
move job_count_breakout code into AnalysisStats to be called centrally
parent
e7abbed0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
17 deletions
+22
-17
modules/Bio/EnsEMBL/Hive/AnalysisStats.pm
modules/Bio/EnsEMBL/Hive/AnalysisStats.pm
+16
-0
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
+6
-17
No files found.
modules/Bio/EnsEMBL/Hive/AnalysisStats.pm
View file @
fd223969
...
...
@@ -271,6 +271,22 @@ sub inprogress_job_count {
}
sub
job_count_breakout
{
my
$self
=
shift
;
my
@counter_list
=
();
foreach
my
$count_method
(
qw(semaphored_job_count ready_job_count inprogress_job_count done_job_count failed_job_count)
)
{
if
(
my
$count
=
$self
->
$count_method
())
{
push
@counter_list
,
$count
.
substr
(
$count_method
,
0
,
1
);
}
}
my
$breakout
=
join
('
+
',
@counter_list
);
$breakout
.=
'
=
'
.
$self
->
total_job_count
()
if
(
scalar
(
@counter_list
)
!=
1
);
# only provide a total if multiple or no categories available
return
$breakout
;
}
sub
print_stats
{
my
$self
=
shift
;
...
...
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
View file @
fd223969
...
...
@@ -273,26 +273,15 @@ sub _add_hive_details {
sub
_add_analysis_node
{
my
(
$self
,
$a
)
=
@_
;
my
$graph
=
$self
->
graph
();
#Check we can invoke it & then check if it was able to be empty
my
$shape
=
$a
->
can_be_empty
()
?
'
doubleoctagon
'
:
'
ellipse
'
;
my
$status_colour
=
$self
->
config
->
get
('
Graph
',
'
Node
',
$a
->
stats
->
status
,
'
Colour
');
my
$node_fontname
=
$self
->
config
->
get
('
Graph
',
'
Node
',
$a
->
stats
->
status
,
'
Font
');
my
$stats
=
$a
->
stats
();
my
@counter_list
=
();
foreach
my
$count_method
(
qw(semaphored_job_count ready_job_count inprogress_job_count done_job_count failed_job_count)
)
{
if
(
my
$count
=
$stats
->
$count_method
())
{
push
@counter_list
,
$count
.
substr
(
$count_method
,
0
,
1
);
}
}
my
$analysis_label
=
$a
->
logic_name
()
.
'
(
'
.
$a
->
dbID
()
.
'
)\n
'
.
join
('
+
',
@counter_list
);
$analysis_label
.=
'
=
'
.
$stats
->
total_job_count
()
if
(
scalar
(
@counter_list
)
!=
1
);
# only provide a total if multiple or no categories available
$graph
->
add_node
(
_analysis_node_name
(
$a
->
dbID
()
),
my
$analysis_label
=
$a
->
logic_name
()
.
'
(
'
.
$a
->
dbID
()
.
'
)\n
'
.
$stats
->
job_count_breakout
();
my
$shape
=
$a
->
can_be_empty
()
?
'
doubleoctagon
'
:
'
ellipse
'
;
my
$status_colour
=
$self
->
config
->
get
('
Graph
',
'
Node
',
$stats
->
status
,
'
Colour
');
my
$node_fontname
=
$self
->
config
->
get
('
Graph
',
'
Node
',
$stats
->
status
,
'
Font
');
$self
->
graph
->
add_node
(
_analysis_node_name
(
$a
->
dbID
()
),
label
=>
$analysis_label
,
shape
=>
$shape
,
style
=>
'
filled
',
...
...
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