Dividing Uneven Series (Filtering One series to include nodes that exist in another)

Hey Everyone, I have some data coming in that I need help with. These are statsd type metrics.
Basically, lets say they are called:
system.users.createdobjects..count
system.users.rejectedobjects.
.count

In both of those series, the * node is a username.
The trouble is that its very possible for a user to have created objects but never to have registered a stat for rejected objects. I COULD just add a 0 stat or something on the rejected metric every time the other one triggers to make sure the lists are the same, but that will interfere with my occurrence count metrics, and other things. It also seems unnecessary.

What I want is to basically find a way to do one of the following:

  • Reduce the list of returns from query A to only include items with matching names in the 5th node position in query B. For instance if A has 30 user names, and B has 25 usernames, the 5 that dont exist in B would just be filtered out of this query on A.
  • Insert 0 values in B for any items that dont exist in A
  • Any other similar action.

The goal, in the end is to take the series lists and do a seriesDiff from A to B. So lets say user “test” has created 50 objects, and had 3 objects rejected, the diff would give me 47 for them. I would then do a series Divide on thia result versus original series A again, and scale it by 100. ie, (47/50)*100 to get a percentage of “good” objects from the user.

I will probably also be doing something like integral() + keepLastValue on the A and B series so that the values are cumulative over whatever range we are viewing.

If anyone knows how to help with this ill be very grateful!