Skip to content

Commit

Permalink
Merge pull request #9876 from lassewesth/diespecs10
Browse files Browse the repository at this point in the history
diespecs10
  • Loading branch information
lassewesth authored Nov 26, 2024
2 parents 8d7ed47 + 343e9a7 commit 97e09b8
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 347 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,22 @@
import org.assertj.core.data.Offset;
import org.junit.jupiter.api.Test;
import org.neo4j.gds.Orientation;
import org.neo4j.gds.applications.algorithms.centrality.CentralityAlgorithms;
import org.neo4j.gds.applications.algorithms.machinery.ProgressTrackerCreator;
import org.neo4j.gds.applications.algorithms.machinery.RequestScopedDependencies;
import org.neo4j.gds.compat.TestLog;
import org.neo4j.gds.core.concurrency.Concurrency;
import org.neo4j.gds.core.concurrency.DefaultPool;
import org.neo4j.gds.core.utils.progress.EmptyTaskRegistryFactory;
import org.neo4j.gds.core.utils.progress.tasks.ProgressTracker;
import org.neo4j.gds.core.utils.progress.tasks.TaskProgressTracker;
import org.neo4j.gds.core.utils.warnings.EmptyUserLogRegistryFactory;
import org.neo4j.gds.extension.GdlExtension;
import org.neo4j.gds.extension.GdlGraph;
import org.neo4j.gds.extension.IdFunction;
import org.neo4j.gds.extension.Inject;
import org.neo4j.gds.extension.TestGraph;
import org.neo4j.gds.logging.GdsTestLog;
import org.neo4j.gds.termination.TerminationFlag;

import static org.assertj.core.api.Assertions.assertThat;
import static org.neo4j.gds.assertj.Extractors.removingThreadId;
Expand Down Expand Up @@ -145,17 +149,16 @@ void testSpreadWithSeed1() {

@Test
void shouldLogProgress() {
var config = InfluenceMaximizationStreamConfigImpl.builder().seedSetSize((int) graph.nodeCount()).build();

var factory = new CELFAlgorithmFactory<>();

var progressTask = factory.progressTask(graph, config);
var log = new GdsTestLog();
var progressTracker = new TaskProgressTracker(progressTask, log, new Concurrency(4), EmptyTaskRegistryFactory.INSTANCE);
var requestScopedDependencies = RequestScopedDependencies.builder()
.with(EmptyTaskRegistryFactory.INSTANCE)
.with(EmptyUserLogRegistryFactory.INSTANCE)
.build();
var progressTrackerCreator = new ProgressTrackerCreator(log, requestScopedDependencies);
var centralityAlgorithms = new CentralityAlgorithms(progressTrackerCreator, TerminationFlag.RUNNING_TRUE);

factory
.build(graph, config, progressTracker)
.compute();
var config = InfluenceMaximizationStreamConfigImpl.builder().seedSetSize((int) graph.nodeCount()).build();
centralityAlgorithms.celf(graph, config);

assertThat(log.getMessages(TestLog.INFO))
.extracting(removingThreadId())
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 97e09b8

Please sign in to comment.