Skip to content

Commit d93833d

Browse files
committed
benchmark
1 parent 2f860d1 commit d93833d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

reconstruction/ai/src/main/java/org/jlab/service/ai/DCDenoiseEngine.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.jlab.clas.reco.ReconstructionEngine;
2323
import org.jlab.io.base.DataBank;
2424
import org.jlab.io.base.DataEvent;
25+
import org.jlab.utils.benchmark.Benchmark;
2526
import org.jlab.utils.system.ClasUtilsFile;
2627

2728
public class DCDenoiseEngine extends ReconstructionEngine {
@@ -85,10 +86,14 @@ public boolean processDataEvent(DataEvent event) {
8586
DataBank bank = event.getBank(BANK_NAMES[i]);
8687
try {
8788
// WARNING: Predictor is *not* thread safe.
89+
Benchmark.getInstance().resume("GETPRED");
8890
Predictor<float[][], float[][]> predictor = predictors.get();
91+
Benchmark.getInstance().pause("GETPRED");
8992
for (int sector=0; sector<6; sector++) {
9093
float[][] input = DCDenoiseEngine.read(bank, sector+1);
94+
Benchmark.getInstance().resume("PREDICT");
9195
float[][] output = predictor.predict(input);
96+
Benchmark.getInstance().pause("PREDICT");
9297
//System.out.println("IN:");show(input);
9398
//System.out.println("OUT:");show(output);
9499
update(bank, threshold, output, sector);

0 commit comments

Comments
 (0)