Skip to content
Snippets Groups Projects
Commit 320edad9 authored by vlorentz's avatar vlorentz
Browse files

Make ProgressLogger display the class name

parent fb818fd2
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,8 @@ import org.softwareheritage.graph.*;
import java.io.IOException;
import java.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/* Lists all nodes nodes of the types given as argument, in topological order,
* from leaves (contents, if selected) to the top (origins, if selected).
......@@ -43,6 +45,8 @@ public class TopoSort {
private long endIndex; // In BFS mode, index of the end of the queue where to pop from; in DFS mode, index of the
// top of the stack
final static Logger logger = LoggerFactory.getLogger(TopoSort.class);
private class MyLongBigArrayBigList extends LongBigArrayBigList {
public MyLongBigArrayBigList(long size) {
super(size);
......@@ -143,7 +147,7 @@ public class TopoSort {
MyLongBigArrayBigList unvisitedAncestors = new MyLongBigArrayBigList(underlyingGraph.numNodes());
/* First, push all leaves to the stack */
ProgressLogger pl = new ProgressLogger();
ProgressLogger pl = new ProgressLogger(logger);
pl.itemsName = "nodes";
pl.expectedUpdates = graph.numNodes();
pl.start("Listing leaves...");
......@@ -168,7 +172,7 @@ public class TopoSort {
System.err.println("Leaves listed, starting traversal.");
System.out.format("SWHID,ancestors,successors,sample_ancestor1,sample_ancestor2\n");
pl = new ProgressLogger();
pl = new ProgressLogger(logger);
pl.itemsName = "edges";
pl.expectedUpdates = total_edges;
pl.start("Sorting...");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment