dissertation-3-evaluation/graphs/store.py
Jake Hillion a9d001e764 Refactored graph generation
- Refactored graph generation
- Added bar graphs and switched most
2020-12-12 10:40:29 +00:00

22 lines
663 B
Python

from typing import Dict
from structure import IperfResult, StandardTest
class TestStore:
def __init__(self):
self.inbound: Dict[str, IperfResult] = dict()
self.outbound: Dict[str, IperfResult] = dict()
def save_inbound(self, test: StandardTest, result: IperfResult):
self.inbound[test.name()] = result
def save_outbound(self, test: StandardTest, result: IperfResult):
self.outbound[test.name()] = result
def get_inbound(self, test: StandardTest) -> IperfResult:
return self.inbound[test.name()]
def get_outbound(self, test: StandardTest) -> IperfResult:
return self.outbound[test.name()]