def test_production_runs(self): r"""Test production tests (those used in paper).""" self.check_filename() # Limit language list for tests for c in ['comm_type', 'language', 'platform', 'python_ver']: kwargs = copy.deepcopy(self.inst_kwargs) kwargs.update(compare=c, cleanup_plot=True, use_paper_values=True) if c in kwargs: del kwargs[c] timing.plot_scalings(**kwargs) # Also do MacOS plot w/ Matlab if c == 'language': kwargs['platform'] = 'MacOS' timing.plot_scalings(**kwargs)
def yggtime_paper(): r"""Create plots for timing.""" _lang_list = timing._lang_list _lang_list_nomatlab = copy.deepcopy(_lang_list) _lang_list_nomatlab.remove('matlab') timing.plot_scalings(compare='platform', python_ver='2.7') # All plots on Linux, no matlab timing.plot_scalings(compare='comm_type', platform='Linux', python_ver='2.7') timing.plot_scalings(compare='python_ver', platform='Linux') timing.plot_scalings(compare='language', platform='Linux', python_ver='2.7', compare_values=_lang_list_nomatlab) # Language comparision on MacOS, with matlab timing.plot_scalings(compare='language', platform='MacOS', python_ver='2.7', compare_values=_lang_list)
def test_plot_scalings(self): r"""Test plot_scalings corner cases on test platform.""" self.check_filename() kwargs = copy.deepcopy(self.inst_kwargs) kwargs.update(msg_size=[self.size], msg_size0=self.size, msg_count=[self.count], msg_count0=self.count, cleanup_plot=True) for c in ['comm_type', 'language', 'platform', 'python_ver']: ikws = copy.deepcopy(kwargs) ikws['compare'] = c if c in ikws: del ikws[c] if c == 'language': ikws['per_message'] = True ikws['compare_values'] = [self.language] timing.plot_scalings(**ikws) # Errors assert_raises(ValueError, timing.plot_scalings, compare='invalid') assert_raises(RuntimeError, timing.plot_scalings, compare='comm_type', comm_type='zmq')
def test_plot_scalings(self, check_filename, instance_kwargs, count, size, language, close_figures, disable_verify_count_fds): r"""Test plot_scalings corner cases on test platform.""" kwargs = copy.deepcopy(instance_kwargs) kwargs.update(msg_size=[size], msg_size0=size, msg_count=[count], msg_count0=count, cleanup_plot=True) for c in ['comm_type', 'language', 'platform', 'python_ver']: ikws = copy.deepcopy(kwargs) ikws['compare'] = c if c in ikws: del ikws[c] if c == 'language': ikws['per_message'] = True ikws['compare_values'] = [language] timing.plot_scalings(**ikws) # Errors with pytest.raises(ValueError): timing.plot_scalings(compare='invalid') with pytest.raises(RuntimeError): timing.plot_scalings(compare='comm_type', comm_type='zmq')
def yggtime_py(): r"""Plot timing statistics comparing the different versions of Python.""" from yggdrasil import timing timing.plot_scalings(compare='python')
def yggtime_os(): r"""Plot timing statistics comparing the different operating systems.""" from yggdrasil import timing timing.plot_scalings(compare='platform')
def yggtime_lang(): r"""Plot timing statistics comparing the different languages.""" from yggdrasil import timing timing.plot_scalings(compare='language')
def yggtime_comm(): r"""Plot timing statistics comparing the different communication mechanisms.""" from yggdrasil import timing timing.plot_scalings(compare='commtype')