import json

import matplotlib.pyplot as plt

import step3_1
import step3_2
import step3_3
import step4
import step5
import step6
import step7
from records import DataBlob
from util import get_most_recent_file_name

with open(get_most_recent_file_name("data", "write_")) as f:
    datablob = DataBlob(json.loads(f.read()))
    step7.main(datablob)
    plt.show()
Exemplo n.º 2
0
import json

import matplotlib.pyplot as plt

from records import DataBlob
from util import get_most_recent_file_name, plot_different_size_different_lock


def main(datablob: DataBlob):
    plot_different_size_different_lock("../report/step6_1.png", datablob,
                                       [5, 1000, 5000], ["Mutex", "Flags"])
    plot_different_size_different_lock("../report/step6_2.png",
                                       datablob, [5, 1000, 5000],
                                       ["Mutex", "Flags"],
                                       error_bars=False)


if __name__ == "__main__":
    plt.show()
    fname = get_most_recent_file_name("data", "run_")
    dat_file = open(fname, "r")
    data = json.loads(dat_file.read())
    print(data)
    d = DataBlob(data)
    main(d)
Exemplo n.º 3
0
import json

import matplotlib.pyplot as plt

import step3_1
import step3_2
import step3_3
import step4
import step5
import step6
import step7
from records import DataBlob
from util import get_most_recent_file_name

with open(get_most_recent_file_name("data", "run_")) as f:
    datablob = DataBlob(json.loads(f.read()))
    step3_1.main(datablob)
    step3_2.main(datablob)
    step3_3.main(datablob)
    step4.main(datablob)
    step5.main(datablob)
    step6.main(datablob)
    step7.main(datablob)

    plt.show()