<commit_before>#!/usr/bin/python

"Create a 64-node tree network, and test connectivity using ping."

from mininet.log import setLogLevel
from mininet.net import init, Mininet
from mininet.node import KernelSwitch, UserSwitch, OVSKernelSwitch
from mininet.topolib import TreeTopo

def TreeNet( depth=1, fanout=2, **kwargs ):
    "Convenience function for creating tree networks."
    topo = TreeTopo( depth, fanout )
    return Mininet( topo, **kwargs )

def treePing64():
    "Run ping test on 64-node tree networks."

    results = {}
    switches = { 'reference kernel': KernelSwitch,
        'reference user': UserSwitch,
        'Open vSwitch kernel': OVSKernelSwitch }

    for name in switches.keys():
        print "*** Testing", name, "datapath"
        switch = switches[ name ]
        network = TreeNet( depth=2, fanout=8, switch=switch )
        result = network.run( network.pingAll )
        results[ name ] = result

    print<commit_msg>Removed TreeNet() convenience function (moved to topolib.)<commit_after>#!/usr/bin/python

"Create a 64-node tree network, and test connectivity using ping."

from mininet.log import setLogLevel
from mininet.net import init, Mininet
from mininet.node import KernelSwitch, UserSwitch, OVSKernelSwitch
from mininet.topolib import TreeTopo



def treePing64():
    "Run ping test on 64-node tree networks."

    results = {}
    switches = { 'reference kernel': KernelSwitch,
        'reference user': UserSwitch,
        'Open vSwitch kernel': OVSKernelSwitch }

    for name in switches.keys():
        print "*** Testing", name, "datapath"
        switch = switches[ name ]
        network = TreeNet( depth=2, fanout=8, switch=switch )
        result = network.run( network.pingAll )
        results[ name ] = result

    print
{'fraction_non_alphanumeric': 0.09994385176866928, 'fraction_numerical': 0.010106681639528355, 'mean_word_length': 3.314769975786925, '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': '2934704', 'n_tokens_mistral': 549, 'n_tokens_neox': 512, 'n_words': 172}