Skip to content

Commit 79e3450

Browse files
committed
Allow subclasses to get information about the completion rate
1 parent e18ed3c commit 79e3450

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

soot-infoflow/src/soot/jimple/infoflow/data/pathBuilders/BatchPathBuilder.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public void computeTaintPaths(Set<AbstractionAtSink> res) {
3838
int batchId = 1;
3939
long startTime = System.nanoTime();
4040
long totalTime = manager.getConfig().getPathConfiguration().getPathReconstructionTotalTime();
41+
int completed = 0;
4142

4243
while (resIt.hasNext()) {
4344
// checking if the execution time exceeds the configured totalTime and logging
@@ -86,7 +87,8 @@ public void computeTaintPaths(Set<AbstractionAtSink> res) {
8687
resultExecutor.reset();
8788
}
8889
logger.info("Single batch has used " + (System.nanoTime() - beforeBatch) / 1E9 + " seconds");
89-
90+
completed += batch.size();
91+
reportCompletion(completed, res.size());
9092
// If the analysis failed due to an OOM, it doesn't make sense to proceed with
9193
// the next batch and get into yet another OOM
9294
ISolverTerminationReason currentReason = innerBuilder.getTerminationReason();
@@ -106,6 +108,10 @@ public void computeTaintPaths(Set<AbstractionAtSink> res) {
106108
}
107109
}
108110

111+
protected void reportCompletion(int completed, int totalTasks) {
112+
113+
}
114+
109115
@Override
110116
public InfoflowResults getResults() {
111117
return innerBuilder.getResults();

0 commit comments

Comments
 (0)