def mse_persist_time_and_memory(run, session, timings):
    """
    Persist the memory results in the database.

    Args:
        run: The run we attach this timing results to.
        session: The db transaction we belong to.
        timings: The timing measurements we want to store.
    """
    from benchbuild.utils import schema as s
    for timing in timings:
        session.add(s.Metric(name='time.user_s', value=timing[0], run_id=
            run.id))
        session.add(s.Metric(name='time.system_s', value=timing[1], run_id=
            run.id))
        session.add(s.Metric(name='time.real_s', value=timing[2], run_id=
            run.id))
        session.add(s.Metric(name='time.rss', value=timing[3], run_id=run.id))
