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

stress plugin: sm_read_number is never updated for threads #2

Open
LiXi-storage opened this issue Jul 7, 2021 · 0 comments
Open

stress plugin: sm_read_number is never updated for threads #2

LiXi-storage opened this issue Jul 7, 2021 · 0 comments

Comments

@LiXi-storage
Copy link
Owner

See envzhu/collectd@13d3547

To fix the problem of not updating sm_read_number for each thread, instead of changing stress_metrics of all threads, I'd recommend to do the following change:

  1. add "int *sm_read_number_pointer;" in "struct stress_metric"
    2.. in stress_setup_environment_thread(), add "stress_metrics[metric_index].sm_read_number_pointer = &(stress_metric->sm_read_number);"
  2. In stress_variable_field_get(), change "int read_number = sm->sm_read_number;" to "int read_number = *sm->sm_read_number_pointer ;"
  3. Other places remain the same. We don't care the value of sm_read_number_pointer in se_metric_head, and we don't care the value of sm_read_number in se_thread_datas[i].std_stress_metrics
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