Beispiel #1
0
import sys
from display_metrics import display_metrics

try:
    # load workflow specification filename and regions
    fname = sys.argv[1]
    region = sys.argv[2].split(",")

    # initialize workflow
    wf = IEEETestWorkflow("../ieee/inputs/%s" % (fname))

    # redirect STDOUT
    sys.stdout = open("../ieee/outputs/%s_output" % (fname), "w")

    # initialize pre_deployer
    pre = PreDeployer(wf)

    # run workflow
    wf_results = pre.run_workflow(region)

    # display execution time
    print display_metrics(wf_results, "exec time")


except Exception as e:
    # print stack trace
    print traceback.format_exc()
finally:
    # ensure that all instance are terminated
    pre.cleanup_regions()
Beispiel #2
0
    # write graph to output
    graph.write_png(outfile, prog='dot')


try:
    # load workflow specification filename
    fname = sys.argv[1]
    # initialize workflow
    wf = IEEETestWorkflow("../ieee/inputs/%s" % (fname))

    # redirect STDOUT
    sys.stdout = open("../ieee/outputs/%s_pre" % (fname), "w")

    # load pre deployer and generate GraphViz output
    pre = PreDeployer(wf)
    build_graph(wf,
                pre.conn.get_instances().values(),
                "../ieee/outputs/%s_graph.png" % (fname))

    # analyze workflow
    distances = pre.analyze_workflow()

    # display metrics
    print display_metrics(distances['geo'], "dist")
    print display_metrics(distances['rtts'], "rtt")
    print display_metrics(distances['ping'], "ping")

    print display_metrics(distances['combination'], "final")

except Exception as e:
Beispiel #3
0
import traceback
import sys
from display_metrics import display_metrics

try:
    # load workflow specification filename and regions
    fname = sys.argv[1]
    region = sys.argv[2].split(",")

    # initialize workflow
    wf = IEEETestWorkflow("../ieee/inputs/%s" % (fname))

    # redirect STDOUT
    sys.stdout = open("../ieee/outputs/%s_output" % (fname), "w")

    # initialize pre_deployer
    pre = PreDeployer(wf)

    # run workflow
    wf_results = pre.run_workflow(region)

    # display execution time
    print display_metrics(wf_results, "exec time")

except Exception as e:
    # print stack trace
    print traceback.format_exc()
finally:
    # ensure that all instance are terminated
    pre.cleanup_regions()
Beispiel #4
0
    # write graph to output
    graph.write_png(outfile, prog='dot')


try:
    # load workflow specification filename
    fname = sys.argv[1]
    # initialize workflow
    wf = IEEETestWorkflow("../ieee/inputs/%s" % (fname))

    # redirect STDOUT
    sys.stdout = open("../ieee/outputs/%s_pre" % (fname), "w")

    # load pre deployer and generate GraphViz output
    pre = PreDeployer(wf)
    build_graph(wf, pre.conn.get_instances().values(), "../ieee/outputs/%s_graph.png" % (fname))

    # analyze workflow
    distances = pre.analyze_workflow()

    # display metrics
    print display_metrics(distances['geo'], "dist")
    print display_metrics(distances['rtts'], "rtt")
    print display_metrics(distances['ping'], "ping")

    print display_metrics(distances['combination'], "final")


except Exception as e:
    # print stack trace