Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-graph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Antoine Lambert
swh-graph
Commits
320edad9
Commit
320edad9
authored
2 years ago
by
vlorentz
Browse files
Options
Downloads
Patches
Plain Diff
Make ProgressLogger display the class name
parent
fb818fd2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
java/src/main/java/org/softwareheritage/graph/utils/TopoSort.java
+6
-2
6 additions, 2 deletions
.../main/java/org/softwareheritage/graph/utils/TopoSort.java
with
6 additions
and
2 deletions
java/src/main/java/org/softwareheritage/graph/utils/TopoSort.java
+
6
−
2
View file @
320edad9
...
...
@@ -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..."
);
...
...
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