I'm trying to profile my code to detect bottleneck. I have searched some profiler, but I never find what I was looking for.
I used a lot python in the past, and there was this software : line_profiler who gives this kind of return :
0 Line Hits Time Per Hit % Time Line Contents
11 @profile
12 def compute_prior(folder):
13 """
14 Given a folder, we compute the prior of neg and pos
15 folder = "./movie-reviews-en/train/"
16 """
17 # we compute the number of positive reviews
18 3 1719 573.0 52.9 number_positive = len([f for f in listdir(folder + "pos/")])
19 # then the negative
20 3 1512 504.0 46.6 number_negative = len([f for f in listdir(folder + "neg/")])
21 # we add it and we have the total
22 3 6 2.0 0.2 total = number_positive + number_negative
23 # we devide to have the probabilites
24 3 6 2.0 0.2 number_positive /= total
25 3 1 0.3 0.0 number_negative /= total
26 # we return this three numbers
27 3 3 1.0 0.1 return [number_positive, number_negative, total]
Is there something similare in the Java world ?
Thanks for the reply.
p.s: I already know yourkit, jprofiler, visualwm, but I want something inside the code.