users@jersey.java.net

[Jersey] Re: Monitoring Statistics issues

From: 鲍明礼 <mingli.bao_at_yolu-inc.com>
Date: Wed, 9 Apr 2014 21:19:41 +0800

Hi,
attachment is a simple project . I want to use StatisticsController to get statistics info about execution info about DemoController, but the result is strange. Can you give me some advice?


Thanks.
 


在 2014-4-8,上午12:23,Marek Potociar <marek.potociar_at_oracle.com> 写道:

> Yes, from your description we know that you can see a problem. But without a code that we can run on our own machines, we will not be able to reproduce the code and dig into the issue.
>
> Marek
>
> On 02 Apr 2014, at 15:33, 鲍明礼 <mingli.bao_at_yolu-inc.com> wrote:
>
>>
>> Thanks for your reply.
>>
>> <PastedGraphic-2.tiff>
>>
>>
>> Before the code below, I see resourceClassStatistics as above.
>>
>> <PastedGraphic-1.tiff>
>>
>> After that I get classStats as below. I don't know what is wrong.
>>
>>
>> <PastedGraphic-3.tiff>
>>
>>
>> Thanks.
>>
>> 在 2014-4-2,下午7:39,Marek Potociar <marek.potociar_at_oracle.com> 写道:
>>
>>> It would be good if you could provide a more complete code, exception stack trace and/or ideally a runnable example that can reproduce the issue. From this little information you have provided I'm afraid I am not able to help you.
>>>
>>> Marek
>>>
>>> On 01 Apr 2014, at 18:09, 鲍鱼 <452537773_at_qq.com> wrote:
>>>
>>>> Hi,all. I want to get jersey resource statistics so I use monitoring statistics. But when I use monitoringStatisticsProvider.get().snapshot().getResourceClassStatistics() ,the map I got has little info. I debugged and found that in MonitoringStatisticsImpl.java resourceClassStatistics has all statistics info I need ,but after the code below classStats has little info with "unable to evaluate the expression Method threw 'java.lang.NullPointerException' exception." in debug window.
>>>>
>>>> Map<Class<?>, ResourceStatistics> classStats = Collections.unmodifiableMap(Maps.transformValues(this.resourceClassStatistics,buildingFunction));
>>>>
>>>> Any one can help me ?
>>>>
>>>>
>>>> Thanks very much.
>>>
>>
>