<div dir="ltr">BTW,<div>I wonder how we had in mind the computing of the 3 busiest variants, what does it mean exactly ? </div><div>Should we not sum up all the receiver for each VariantMetricInformation and from there get the top 3  ? Not sure this is happening right now, maybe @matzew or @edewit could give more info.</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 31, 2014 at 11:31 AM, Daniel Bevenius <span dir="ltr">&lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry, looking into this and I can&#39;t see any easy fix. <div>The problem as I see it is that the for the same variantId there can be multiple receivers. But we currently don&#39;t know which ApplicationVariant the receivers belong to. So we cannot match them up in DashBoardService.<div>

This my first time looking at the code so I might be missing something. So I&#39;d say your first post about the query being wrong is correct, and we have to take the match the VariantMetricInformation and match it with a pushApplicationId. Again, I could be way off here :)</div>

<div><br></div><div> </div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 31 July 2014 10:47, Daniel Bevenius <span dir="ltr">&lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey Seb, <div><br></div><div>sure let me take a closer look at this. I&#39;m getting the feeling that it might not be as simple as that. Let me push something and we can discuss it.</div>

<div><br></div><div>
<br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 31 July 2014 10:39, Sebastien Blanc <span dir="ltr">&lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Dan,<div>Not sure if I understand exactly what you meant, could do a small snippet ? </div><div><br>

</div>
</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 31, 2014 at 10:08 AM, Daniel Bevenius <span dir="ltr">&lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Oh I see. Then I&#39;d say you&#39;ll need to change the return type to either use a custom object for the key in the map, or perhaps return a list with that came custom object. What ever makes the most sense in this use case. Makes sense?</div>



<div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 31 July 2014 09:39, Sebastien Blanc <span dir="ltr">&lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">Well, several VariantMetricInformation instances can have the same VariantID, at each send , one is created : <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/push%2Fsrc%2Fmain%2Fjava%2Forg%2Fjboss%2Faerogear%2Funifiedpush%2Fmessage%2FSenderServiceImpl.java#L133" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/push%2Fsrc%2Fmain%2Fjava%2Forg%2Fjboss%2Faerogear%2Funifiedpush%2Fmessage%2FSenderServiceImpl.java#L133</a><div>





<br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 31, 2014 at 9:34 AM, Daniel Bevenius <span dir="ltr">&lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt;</span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is this because variantFour and variantFive have the same variantId (231543432434)? When added to the map only one will exist later in findTopThreeBusyVariantIDs. <div>





<br></div><div><br></div><div><br></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On 31 July 2014 09:20, Sebastien Blanc <span dir="ltr">&lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>&gt;</span> wrote:<br>






</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Morning Peeps,<div><br><div>I&#39;m currently trying to fix AGPUSH-848[1].</div>
<div>Basically, the number of receivers shown in the top3 list is not always accurate.</div>
<div><br></div><div>I suspect that something is wrong with this query : </div>
<div><br></div><div><a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model/jpa/src/main/java/org/jboss/aerogear/unifiedpush/jpa/dao/impl/JPAPushMessageInformationDao.java#L99-L104" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model/jpa/src/main/java/org/jboss/aerogear/unifiedpush/jpa/dao/impl/JPAPushMessageInformationDao.java#L99-L104</a><br>







</div><div><br></div><div>I have change this test case : </div><div><a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model%2Fjpa%2Fsrc%2Ftest%2Fjava%2Forg%2Fjboss%2Faerogear%2Funifiedpush%2Fjpa%2FPushMessageInformationDaoTest.java#L251" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server/blob/master/model%2Fjpa%2Fsrc%2Ftest%2Fjava%2Forg%2Fjboss%2Faerogear%2Funifiedpush%2Fjpa%2FPushMessageInformationDaoTest.java#L251</a><br>







</div><div><br></div><div>By adding just one VariantInformation[2] and now the test is failing and I have no idea why, so I would aprreciate a second eye on this.</div><div><br></div><div>I&#39;m probably missing something obvious but I can not see it right now :)</div>







<div><br></div><div>Sebi</div><div><br></div><div><br></div><div>[1]<a href="https://issues.jboss.org/browse/AGPUSH-848" target="_blank">https://issues.jboss.org/browse/AGPUSH-848</a></div><div>[2]<a href="https://gist.github.com/sebastienblanc/ea34e7f9fdafbc0785f2#file-gistfile1-java-L30-L35" target="_blank">https://gist.github.com/sebastienblanc/ea34e7f9fdafbc0785f2#file-gistfile1-java-L30-L35</a></div>







</div></div>
<br></div></div>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br></div>