Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpc-workflow-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FIJI
hpc-workflow-manager
Commits
ad9ace9e
"docs.it4i/anselm-cluster-documentation/compute-nodes.md" did not exist on "5dcd0a4f0b18bb1de690f8ca3f45688280ee587d"
Commit
ad9ace9e
authored
7 years ago
by
Unknown
Browse files
Options
Downloads
Patches
Plain Diff
formatStatistics: adding a try/catch block
parent
6e79bbf2
No related branches found
No related tags found
1 merge request
!2
Format statistics
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/core/BenchmarkJobManager.java
+28
-10
28 additions, 10 deletions
...4i/fiji/haas_spim_benchmark/core/BenchmarkJobManager.java
with
28 additions
and
10 deletions
haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/core/BenchmarkJobManager.java
+
28
−
10
View file @
ad9ace9e
...
...
@@ -2,6 +2,7 @@ package cz.it4i.fiji.haas_spim_benchmark.core;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.nio.file.InvalidPathException
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.util.Arrays
;
...
...
@@ -185,30 +186,47 @@ public class BenchmarkJobManager {
}
private
Predicate
<
String
>
downloadFinishedData
(
String
filePattern
)
{
private
static
Predicate
<
String
>
downloadFinishedData
(
String
filePattern
)
{
return
name
->
{
Path
p
=
Paths
.
get
(
name
);
String
fileName
=
p
.
getFileName
().
toString
();
Path
path
=
getPathSafely
(
name
);
if
(
path
==
null
)
return
false
;
String
fileName
=
path
.
getFileName
().
toString
();
return
fileName
.
startsWith
(
filePattern
)
&&
fileName
.
endsWith
(
"h5"
)
||
fileName
.
equals
(
filePattern
+
".xml"
)
||
fileName
.
equals
(
"benchmark_result.csv"
);
};
}
static
private
Predicate
<
String
>
downloadStatistics
()
{
private
static
Predicate
<
String
>
downloadStatistics
()
{
return
name
->
{
Path
p
=
Paths
.
get
(
name
);
String
fileName
=
p
.
getFileName
().
toString
();
Path
path
=
getPathSafely
(
name
);
if
(
path
==
null
)
return
false
;
String
fileName
=
path
.
getFileName
().
toString
();
return
fileName
.
equals
(
"benchmark_result.csv"
);
};
}
private
Predicate
<
String
>
downloadFailedData
()
{
private
static
Predicate
<
String
>
downloadFailedData
()
{
return
name
->
{
Path
p
=
Paths
.
get
(
name
);
return
p
.
getFileName
().
toString
().
startsWith
(
"snakejob."
)
||
p
.
getParent
().
getFileName
().
toString
().
equals
(
"logs"
);
Path
path
=
getPathSafely
(
name
);
if
(
path
==
null
)
return
false
;
return
path
.
getFileName
().
toString
().
startsWith
(
"snakejob."
)
||
path
.
getParent
().
getFileName
().
toString
().
equals
(
"logs"
);
};
}
private
static
Path
getPathSafely
(
String
name
)
{
try
{
return
Paths
.
get
(
name
);
}
catch
(
InvalidPathException
ex
)
{
return
null
;
}
}
private
static
Settings
constructSettingsFromParams
(
BenchmarkSPIMParameters
params
)
{
// TODO Auto-generated method stub
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment