"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "stress-cyclic.c" between
stress-ng-0.12.09.tar.xz and stress-ng-0.12.10.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

stress-cyclic.c  (stress-ng-0.12.09.tar.xz):stress-cyclic.c  (stress-ng-0.12.10.tar.xz)
skipping to change at line 433 skipping to change at line 433
if (ns > rt_stats->max_ns) if (ns > rt_stats->max_ns)
rt_stats->max_ns = ns; rt_stats->max_ns = ns;
if (ns < rt_stats->min_ns) if (ns < rt_stats->min_ns)
rt_stats->min_ns = ns; rt_stats->min_ns = ns;
rt_stats->latency_mean += (double)ns; rt_stats->latency_mean += (double)ns;
} }
if (rt_stats->index) if (rt_stats->index)
rt_stats->latency_mean /= (double)rt_stats->index; rt_stats->latency_mean /= (double)rt_stats->index;
qsort(rt_stats->latencies, rt_stats->index, sizeof(int64_t), stress_cycli c_cmp); qsort(rt_stats->latencies, rt_stats->index, sizeof(*(rt_stats->latencies) ), stress_cyclic_cmp);
current = rt_stats->latency_mode = rt_stats->latencies[0]; current = rt_stats->latency_mode = rt_stats->latencies[0];
for (i = 0; i < rt_stats->index; i++) { for (i = 0; i < rt_stats->index; i++) {
int64_t ns = rt_stats->latencies[i]; int64_t ns = rt_stats->latencies[i];
double diff; double diff;
if (ns == current) { if (ns == current) {
n++; n++;
if (n > best_n) { if (n > best_n) {
skipping to change at line 612 skipping to change at line 612
pid_t pid; pid_t pid;
NOCLOBBER uint64_t timeout; NOCLOBBER uint64_t timeout;
uint64_t cyclic_sleep = DEFAULT_DELAY_NS; uint64_t cyclic_sleep = DEFAULT_DELAY_NS;
uint64_t cyclic_dist = 0; uint64_t cyclic_dist = 0;
int32_t cyclic_prio = INT32_MAX; int32_t cyclic_prio = INT32_MAX;
int policy; int policy;
size_t cyclic_policy = 0; size_t cyclic_policy = 0;
const double start = stress_time_now(); const double start = stress_time_now();
stress_rt_stats_t *rt_stats; stress_rt_stats_t *rt_stats;
const size_t page_size = args->page_size; const size_t page_size = args->page_size;
const size_t size = (sizeof(stress_rt_stats_t) + page_size - 1) & (~(page _size - 1)); const size_t size = (sizeof(*rt_stats) + page_size - 1) & (~(page_size - 1));
stress_cyclic_func func; stress_cyclic_func func;
timeout = g_opt_timeout; timeout = g_opt_timeout;
(void)stress_get_setting("cyclic-sleep", &cyclic_sleep); (void)stress_get_setting("cyclic-sleep", &cyclic_sleep);
(void)stress_get_setting("cyclic-prio", &cyclic_prio); (void)stress_get_setting("cyclic-prio", &cyclic_prio);
(void)stress_get_setting("cyclic-policy", &cyclic_policy); (void)stress_get_setting("cyclic-policy", &cyclic_policy);
(void)stress_get_setting("cyclic-dist", &cyclic_dist); (void)stress_get_setting("cyclic-dist", &cyclic_dist);
(void)stress_get_setting("cyclic-method", &cyclic_method); (void)stress_get_setting("cyclic-method", &cyclic_method);
func = cyclic_method->func; func = cyclic_method->func;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)