How to use add_info_widget method in yandex-tank

Best Python code snippet using yandex-tank

main.py

Source:main.py Github

copy

Full Screen

...79 80 self.device_info = self._init_device_info_widget()81 # add the info and device widget to the main canvas82 83 self.dashboard.add_info_widget(self.device_info, y_offset=0)84 self.experiment_info = self._init_experiment_info_widget()85 # add experiment widget to the main canvas86 87 self.dashboard.add_info_widget(88 self.experiment_info, y_offset=self.surface_height * uis.IW_HEIGHT_RATIO)89 self.dashboard_menu = self._init_menu_values()90 91 self._service_menu = self._init_service_menu_values()92 # self.guage_widget_yoffset = self.device_info_widget_yoffset + self.surface_height*0.293 94 self._gauge_temp, self._gauge_O2, self._gauge_CO2, self._gauge_RH = self._init_gauge_widgets()95 # add gauges to main canvas (they are stored as widgets in the canvas)96 self.dashboard.add_gauge_widget(self._gauge_temp, loc_idx=0)97 self.dashboard.add_gauge_widget(self._gauge_O2, loc_idx=1)98 self.dashboard.add_gauge_widget(self._gauge_CO2, loc_idx=2)99 self.dashboard.add_gauge_widget(self._gauge_RH, loc_idx=3)100 # Add registration to registration canvas101 self.registration.add_info_widget(102 Registration('', self.surface_height, self.surface_width),103 y_offset=0104 )105 # Add splash to splash canvas106 self.loading.add_info_widget(107 Loading(self.surface_height, self.surface_width),108 y_offset=0109 )110 # enable registration screen as part of the registration pipeline111 112 events.registration_pipeline.stage(self.enable_registration_screen, 0)113 # disable registration screen when registration is successful114 with StateManager() as state:115 state.subscribe_property(116 _type=Device,117 _property=PropertyCondition[Device](118 trigger=lambda old_device, new_device: not old_device.registered and new_device.registered,119 callback=self.disable_registration_screen,120 callback_on_init=False...

Full Screen

Full Screen

plugin.py

Source:plugin.py Github

copy

Full Screen

...92 q95=quantiles[95] / 1000)93 LOG.info(info)94 else:95 self.screen.add_second_data(data)96 def add_info_widget(self, widget):97 ''' add right panel widget '''98 if not self.screen:99 LOG.debug("No screen instance to add widget")100 else:101 self.screen.add_info_widget(widget)102# ======================================================103class RealConsoleMarkup(object):104 '''105 Took colors from here: https://www.siafoo.net/snippet/88106 '''107 WHITE_ON_BLACK = '\033[37;40m'108 TOTAL_RESET = '\033[0m'109 clear = "\x1b[2J\x1b[H"110 new_line = u"\n"111 YELLOW = '\033[1;33m'112 RED = '\033[1;31m'113 RED_DARK = '\033[31;3m'114 RESET = '\033[1;m' + WHITE_ON_BLACK # fix for MacOS console115 CYAN = "\033[1;36m"...

Full Screen

Full Screen

canvas.py

Source:canvas.py Github

copy

Full Screen

...22 self.width = surface_width23 self.height = surface_height24 self.widgets = []25 self.coords = []26 def add_info_widget(self, widget, y_offset):27 self.widgets.append(widget)28 self.coords.append((0, y_offset))29 def add_gauge_widget(self, widget, loc_idx):30 # x,y grid index based on loc_idx = 0,1,2,331 y_offset = self.height - widget.height*232 i = loc_idx % 233 j = loc_idx // 234 self.widgets.append(widget)35 self.coords.append((widget.width*i, y_offset+widget.height*j))36 def redraw(self, main_surface):37 for idx in range(len(self.widgets)):38 self.widgets[idx].redraw()...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run yandex-tank automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful