示例#1
0
def test_statistics_with_all():
    df = results.get_statistics(r,
                                include_attrs=True,
                                include_itervars=True,
                                include_runattrs=True,
                                include_param_assignments=True,
                                include_config_entries=True)
    _assert_sequential_index(df)
    _assert(sanitize_and_compare_csv(df, "statistics_with_all.csv"),
            "content mismatch")
示例#2
0
from omnetpp.scave import results, chart, utils, plot
import matplotlib.pyplot as plt
import pandas as pd

props = chart.get_properties()
utils.preconfigure_plot(props)

stats = results.get_statistics(props["filter"],
                               include_attrs=True,
                               include_runattrs=True,
                               include_itervars=True)
hists = results.get_histograms(props["filter"],
                               include_attrs=True,
                               include_runattrs=True,
                               include_itervars=True)

df = pd.concat([stats, hists], sort=False)

if df.empty:
    plot.set_warning("The result filter returned no data.")
    exit(1)

title, legend = utils.extract_label_columns(df)

df.sort_values(by=[l for i, l in legend], axis='index', inplace=True)

ax = plt.gca()

# This is how much of the standard deviation will give the 25th and 75th
# percentiles, assuming normal distribution.
# >>> math.sqrt(2) * scipy.special.erfinv(0.5)
示例#3
0
def test_statistics_with_attrs():
    df = results.get_statistics(r, include_attrs=True)
    _assert_sequential_index(df)
    _assert(sanitize_and_compare_csv(df, "statistics_with_attrs.csv"),
            "content mismatch")
示例#4
0
def test_statistics():
    df = results.get_statistics(r)
    _assert_sequential_index(df)
    _assert(sanitize_and_compare_csv(df, "statistics.csv"), "content mismatch")