Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
b384c88d
Commit
b384c88d
authored
1 year ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
c84cb368
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
+6
-0
6 additions, 0 deletions
...t/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
with
6 additions
and
0 deletions
src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
+
6
−
0
View file @
b384c88d
...
...
@@ -16,6 +16,7 @@ import java.util.Map.Entry;
import
java.util.Set
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.logging.Logger
;
import
java.util.stream.Collectors
;
import
com.fasterxml.jackson.databind.JsonNode
;
...
...
@@ -40,6 +41,7 @@ import io.swagger.v3.core.util.Yaml;
* Utilities to run tests on a NSHM.
*/
class
NshmTestUtils
{
private
static
Logger
LOGGER
=
Logger
.
getAnonymousLogger
();
private
static
final
Path
DATA_PATH
=
Paths
.
get
(
"src/test/resources/e2e"
);
private
static
final
double
TOLERANCE
=
1
e
-
12
;
...
...
@@ -55,6 +57,7 @@ class NshmTestUtils {
*/
static
NshmModel
loadModel
(
Nshm
nshm
)
{
int
cores
=
Runtime
.
getRuntime
().
availableProcessors
();
LOGGER
.
info
(
"Cores: "
+
cores
);
return
new
NshmModel
(
nshm
,
ModelLoader
.
load
(
nshm
.
modelPath
()),
...
...
@@ -80,8 +83,11 @@ class NshmTestUtils {
*/
static
void
testNshm
(
Nshm
nshm
)
{
NshmModel
nshmModel
=
loadModel
(
nshm
);
LOGGER
.
info
(
"Model loaded"
);
LOGGER
.
info
(
"Number of sites: "
+
nshm
.
locations
().
size
());
for
(
NamedLocation
location
:
nshm
.
locations
())
{
LOGGER
.
info
(
"Location: "
+
location
.
toString
());
compareCurves
(
nshmModel
,
location
);
}
...
...
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