Beispiel #1
0
def optimize_by_merge_sub_tree():
    logPath = os.path.join(os.path.abspath(''), 'sample.log')
    drain = buildSampleDrain(logPath)
    t = drain.copy()
    createPlot(t)
    t = drain.copy()
    opt = Optimizer()
    opt.modify(method='merge_sub_tree', tree=t)
    # opt.modify(t)
    createPlot(t)
Beispiel #2
0
def optimize_by_seq_dist():
    logPath = os.path.join(os.path.abspath(''), 'sample.log')
    drain = buildSampleDrain(logPath)
    logClusters = drain.logClusters
    printClusters(logClusters)
    opt = Optimizer()
    opt.modify(method='seq_dist', tree=drain.prefixTree, drain=drain, st=0.7)
    logClusters = drain.logClusters
    printClusters(logClusters)
    root = drain.copy()
    createPlot(root)
Beispiel #3
0
def draw_tree():
    rex = ['blk_(|-)[0-9]+', '(/|)([0-9]+\.){3}[0-9]+(:[0-9]+|)(:|)']
    removeCol = [0, 1, 2]
    myParser = Drain(rex=rex, depth=3, removeCol=removeCol)
    root = myParser.load('./results/prefixTree.pkl')
    createPlot(root)