Skip to content

Commit

Permalink
Connect new resource profiling to streamline example model.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Legg authored and mattdailis committed Mar 1, 2024
1 parent 27525c7 commit dfc88d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ public final class Configuration {
@Parameter
public boolean traceResources = false;

@Parameter
public boolean profileResources = false;

@Parameter
public double approximationTolerance = 1e-2;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gov.nasa.jpl.aerie.streamline_demo;

import gov.nasa.jpl.aerie.contrib.streamline.core.Resource;
import gov.nasa.jpl.aerie.contrib.streamline.debugging.Profiling;
import gov.nasa.jpl.aerie.contrib.streamline.modeling.Registrar;
import gov.nasa.jpl.aerie.merlin.framework.ModelActions;
Expand All @@ -12,6 +13,7 @@ public final class Mission {
public Mission(final gov.nasa.jpl.aerie.merlin.framework.Registrar registrar$, final Configuration config) {
var registrar = new Registrar(registrar$, Registrar.ErrorBehavior.Log);
if (config.traceResources) registrar.setTrace();
if (config.profileResources) Resource.profileAllResources();
dataModel = new DataModel(registrar, config);
errorTestingModel = new ErrorTestingModel(registrar, config);
approximationModel = new ApproximationModel(registrar, config);
Expand Down

0 comments on commit dfc88d8

Please sign in to comment.