<commit_before>import networkit

from util import *
import base

framework = "networkit"

# - connected components (properties.ConnectedComponents, properties.ParallelConnectedComponents)

class Algo(base.Algo):
	""" runner for an algorithm"""

	framework = framework

	def loadGraph(self, path):
		with Timer() as t:
			G = networkit.readGraph(path, networkit.Format.GML)
		debug("reading {path} took {t.elapsed} s".format(**locals()))
		return G

class bConnectedComponents(Algo):
	name = "ConnectedComponents"

	def run(self, G):
		cc = networkit.properties.ConnectedComponents(G)
		cc.run()
		return cc.numberOfComponents()


# - k-core decomposition (properties.CoreDecomposition)

class bCoreDecomposition(Algo):
	name = "CoreDecomposition"

	def run(self, G):
		cd = networkit.centrality.CoreDecomposition(G)
		cd.run()

class bCoreDecompositionSeq(Algo):
	name = "CoreDecompositionSeq"

	def run(self, G):
		cd = networkit.centrality.CoreDecomposition(G, enforceBucketQueueAlgorithm=True)
		cd.run()


# - BFS & Dijkstra (graph.BFS, graph.Dijkstra)
class bBFS(Algo):
	name = "BFS"<commit_msg>benchmark updated<commit_after>import networkit

from util import *
import base

framework = "networkit"

# - connected components (properties.ConnectedComponents, properties.ParallelConnectedComponents)

class Algo(base.Algo):
	""" runner for an algorithm"""

	framework = framework

	def loadGraph(self, path):
		with Timer() as t:
			G = networkit.readGraph(path, networkit.Format.GML)
		debug("reading {path} took {t.elapsed} s".format(**locals()))
		return G

class bConnectedComponents(Algo):
	name = "ConnectedComponents"

	def run(self, G):
		cc = networkit.components.ConnectedComponents(G)
		cc.run()
		return cc.numberOfComponents()


# - k-core decomposition (properties.CoreDecomposition)

class bCoreDecomposition(Algo):
	name = "CoreDecomposition"

	def run(self, G):
		cd = networkit.centrality.CoreDecomposition(G)
		cd.run()

class bCoreDecompositionSeq(Algo):
	name = "CoreDecompositionSeq"

	def run(self, G):
		cd = networkit.centrality.CoreDecomposition(G, enforceBucketQueueAlgorithm=True)
		cd.run()


# - BFS & Dijkstra (graph.BFS, graph.Dijkstra)
class bBFS(Algo):
	name = "BFS"
{'fraction_non_alphanumeric': 0.12159709618874773, 'fraction_numerical': 0.0, 'mean_word_length': 5.3, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2077261', 'n_tokens_mistral': 785, 'n_tokens_neox': 728, 'n_words': 164}