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

Graphs with multiple data sources can no longer display percenticles #4263

Closed
KrisShannon opened this issue May 16, 2021 · 4 comments · Fixed by #4265
Closed

Graphs with multiple data sources can no longer display percenticles #4263

KrisShannon opened this issue May 16, 2021 · 4 comments · Fixed by #4265
Labels
bug Undesired behaviour outdated No recent activity resolved A fixed issue
Milestone

Comments

@KrisShannon
Copy link
Contributor

Describe the bug

The fix for #3340 (621091f) added an early return when encountering a NaN data source.

This has stopped percentiles working on graphs with multiple data sources.

To Reproduce

Steps to reproduce the behavior:

  1. Create two data sources, one with data and the other with NaN's
  2. Create a graph using aggregate_current percentiles (e.g.|95:bits:0:aggregate_current:2|) across the two data sources.
  3. View the graph
  4. Percentiles are shown as 0

Expected behavior

Percentile calculation should ignore the NaN data source(s) and be based on any remaining sources with data.

Additional context

I've locally removed the early return from nth_percentile_fetch_statistics and the graphs appear to be working correctly:

--- lib/graph_variables.php
+++ lib/graph_variables.php
@@ -182,8 +182,6 @@ function nth_percentile_fetch_statistics($percentile, &$local_data_ids, &$fetch_array, $cf) {
 							$asum_array[$ds_name][$timestamp]  = $data;
 						}
 					}
-				} else {
-					return false;
 				}
 			}
 		}
@KrisShannon KrisShannon added bug Undesired behaviour unverified Some days we don't have a clue labels May 16, 2021
@TheWitness TheWitness added resolved A fixed issue and removed unverified Some days we don't have a clue labels May 19, 2021
@TheWitness
Copy link
Member

Thanks for your contribution on this.

@DFlexy
Copy link

DFlexy commented Jun 8, 2021

Guys sorry for reply here more i try fix and dont work need help

@TheWitness
Copy link
Member

Sorry, was on sabbatical.

@netniV netniV changed the title Percentile not showing on partial data after fix for #3340 Graphs with multiple data sources can no longer display percenticles Jul 4, 2021
@netniV netniV added this to the 1.2.18 milestone Jul 4, 2021
@github-actions
Copy link

github-actions bot commented Sep 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the outdated No recent activity label Sep 3, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour outdated No recent activity resolved A fixed issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants