← Back to team overview

graphite-dev team mailing list archive

[Question #215601]: Ordering of summarize and diffSeries produces different results

 

New question #215601 on Graphite:
https://answers.launchpad.net/graphite/+question/215601

I think I might be misunderstanding how diffSeries works.  I'm getting different results depending on whether I summarize my arguments before doing diffSeries or not.

I expect the following two graphite queries to return the same numbers, but they don't.  The one with the summarization inside diffSeries seems to be the correct numbers based on taking summarizations of every individual metrics and manually summing them as I intend, but I'd rather have the summarize on the outside since it's slightly shorter and makes changing the interval programmatically easier in a program that's generating these sorts of queries to go in the target parameter of the url.

summarize(                                                                                                                                                                                                                                    
  diffSeries(                                                                                                                                                                                                                                     sum(                                                                                                                                                                                                                                            stats_counts.merchant_center.session.logins.failed_count.one,                                                                                                                                                                                 stats_counts.merchant_center.session.logins.failed_count.more_than_five                                                                                                                                                                     ),                                                                                                                                                                                                                                            sum(                                                                                                                                                                                                                                            stats_counts.merchant_center.session.logins.failed_count_before_success.one,                                                                                                                                                                  stats_counts.merchant_center.session.logins.failed_count_before_success.two,                                                                                                                                                                  stats_counts.merchant_center.session.logins.failed_count_before_success.three,                                                                                                                                                                stats_counts.merchant_center.session.logins.failed_count_before_success.four,                                                                                                                                                           
      stats_counts.merchant_center.session.logins.failed_count_before_success.five,                                                                                                                                                           
      stats_counts.merchant_center.session.logins.failed_count_before_success.more_than_five                                                                                                                                                  
    )                                                                                                                                                                                                                                         
  ),                                                                                                                                                                                                                                          
  '1week',                                                                                                                                                                                                                                      'sum',                                                                                                                                                                                                                                        true                                                                                                                                                                                                                                        )   
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        diffSeries(                                                                                                                                                                                                                                   
  summarize(                                                                                                                                                                                                                                  
    sum(                                                                                                                                                                                                                                      
      stats_counts.merchant_center.session.logins.failed_count.one,                                                                                                                                                                           
      stats_counts.merchant_center.session.logins.failed_count.more_than_five                                                                                                                                                                 
    ),                                                                                                                                                                                                                                        
    '1week',                                                                                                                                                                                                                                  
    'sum',                                                                                                                                                                                                                                    
    true                                                                                                                                                                                                                                        ),                                                                                                                                                                                                                                            summarize(                                                                                                                                                                                                                                  
    sum(                                                                                                                                                                                                                                      
      stats_counts.merchant_center.session.logins.failed_count_before_success.one,                                                                                                                                                            
      stats_counts.merchant_center.session.logins.failed_count_before_success.two,                                                                                                                                                            
      stats_counts.merchant_center.session.logins.failed_count_before_success.three,                                                                                                                                                          
      stats_counts.merchant_center.session.logins.failed_count_before_success.four,                                                                                                                                                           
      stats_counts.merchant_center.session.logins.failed_count_before_success.five,                                                                                                                                                           
      stats_counts.merchant_center.session.logins.failed_count_before_success.more_than_five                                                                                                                                                  
    ),                                                                                                                                                                                                                                        
    '1week',                                                                                                                                                                                                                                  
    'sum',                                                                                                                                                                                                                                    
    true                                                                                                                                                                                                                                      
  )                                                                                                                                                                                                                                           
)

Any insight as to why these would give different results?  I can post raw csv data for anything if that helps.

Thanks

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.