Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroDivisionError for schedule line(N, N, _) case #850

Open
IvanVas opened this issue Oct 9, 2020 · 0 comments
Open

ZeroDivisionError for schedule line(N, N, _) case #850

IvanVas opened this issue Oct 9, 2020 · 0 comments

Comments

@IvanVas
Copy link

IvanVas commented Oct 9, 2020

When line() schedule is used instead of const (start and end are the same) there is a division by zero.

Exception in thread Thread-1:                                                                   
Traceback (most recent call last):          
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()                                                                                         
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 375, in run
    self.core.plugins_configure()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/tankcore.py", line 245, in plugins_configure
    plugin.configure()                                       
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/plugin.py", line 72, in configure
    self.phantom_config = self.phantom.config_file                                                             
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 106, in config_file
    self._config_file = self.compose_config()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 114, in compose_config
    streams_config += stream.compose_config()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/plugins/Phantom/utils.py", line 288, in compose_config
    self.stepper_wrapper.prepare_stepper()                                                                  
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/main.py", line 228, in prepare_stepper
    self.__make_stpd_file()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/main.py", line 316, in __make_stpd_file
    use_cache=self.use_caching)                                 
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/main.py", line 57, in __init__
    self.af = AmmoFactory(ComponentFactory(**kwargs))                                                
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/main.py", line 29, in __init__
    self.load_plan = factory.get_load_plan()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/config.py", line 69, in get_load_plan
    return ip.create(self.instances_schedule)                 
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/instance_plan.py", line 227, in create
    lpb = LoadPlanBuilder().add_all_steps(instances_schedule)
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/instance_plan.py", line 174, in add_all_steps
    self.add_step(step)                                                                                            
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/instance_plan.py", line 166, in add_step  
    _plans[step_type](params)                                      
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/instance_plan.py", line 118, in parse_line  
    int(final_instances), parse_duration(interval))                                                        
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/instance_plan.py", line 58, in line
    self.ramp(final_instances - initial_instances + 1, duration)
  File "/usr/local/lib/python2.7/dist-packages/yandextank/stepper/instance_plan.py", line 41, in ramp
    interval = float(duration) / (count - 1)
ZeroDivisionError: float division by zero     
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant