profiling

HPjmeter-like graphical tool to view -agentlib:hprof profiling output

只愿长相守 提交于 2019-12-17 23:14:38
问题 What tools are available to view the output of the built-in JVM profiler? For example, I'm starting my JVM with: -agentlib:hprof=cpu=times,thread=y,cutoff=0,format=a,file=someFile.hprof.txt This generates output in the hprof ("JAVA PROFILE 1.0.1") format. I have had success in the past using HPjmeter to view these output files in a reasonable way. However, for whatever reason the files that are generated using the current version of the Sun JVM fail to load in the current version of HPjmeter:

A decorator that profiles a method call and logs the profiling result

ε祈祈猫儿з 提交于 2019-12-17 21:57:04
问题 I want to create a decorator that profiles a method and logs the result. How can this be done? 回答1: The decorator would look something like: import time import logging def profile(func): def wrap(*args, **kwargs): started_at = time.time() result = func(*args, **kwargs) logging.info(time.time() - started_at) return result return wrap @profile def foo(): pass Anyway, if you want to do some serious profiling I would suggest you use the profile or cProfile packages. 回答2: If you want proper

Why doesn't perf report cache misses?

偶尔善良 提交于 2019-12-17 21:46:03
问题 According to perf tutorials, perf stat is supposed to report cache misses using hardware counters. However, on my system (up-to-date Arch Linux), it doesn't: [joel@panda goog]$ perf stat ./hash Performance counter stats for './hash': 869.447863 task-clock # 0.997 CPUs utilized 92 context-switches # 0.106 K/sec 4 cpu-migrations # 0.005 K/sec 1,041 page-faults # 0.001 M/sec 2,628,646,296 cycles # 3.023 GHz 819,269,992 stalled-cycles-frontend # 31.17% frontend cycles idle 132,355,435 stalled

How to analyze program running time

蹲街弑〆低调 提交于 2019-12-17 19:03:41
问题 I am trying to optimize a c++ program's performance and reduce its run time. However, I am having trouble figuring out where is the bottleneck. time command shows that the program itself takes about 5 minutes to run, and about the 5 minutes, user cpu time takes 4.5 minutes. CPU profiler (both gcc profiler and google perftool) shows that the function calls only take 60 seconds in total in CPU time. I also tried to use the profiler to sample real time instead of cpu time, and it gives me

How to analyze program running time

自闭症网瘾萝莉.ら 提交于 2019-12-17 19:01:38
问题 I am trying to optimize a c++ program's performance and reduce its run time. However, I am having trouble figuring out where is the bottleneck. time command shows that the program itself takes about 5 minutes to run, and about the 5 minutes, user cpu time takes 4.5 minutes. CPU profiler (both gcc profiler and google perftool) shows that the function calls only take 60 seconds in total in CPU time. I also tried to use the profiler to sample real time instead of cpu time, and it gives me

How to measure network performance (how to benchmark network protocol)

谁说胖子不能爱 提交于 2019-12-17 18:25:01
问题 First, a bit of a background. There are many various comparisons of distributed version control systems (DVCS) which compare size of repository, or benchmark speed of operations. I haven't found any that would benchmark network performance of various DVCS, and various protocols used... beside measuring speed of operations (commands) involving network like 'clone', 'pull'/'fetch' or 'push'. I'd like to know then how would you make such comparison; how to measure network performance of an

nvprof option for bandwidth

孤者浪人 提交于 2019-12-17 17:59:23
问题 What is the correct option for measuring bandwidth using nvprof --metrics from the command line? I am using flop_dp_efficiency to get the percentage of peak FLOPS, but there seems to be many options for bandwidth measurement in the manual that I don't really understand what I am measuring. e.g. dram_read, dram_write, gld_read, gld_write all look the same to me. Also, should I report bandwdith as a sum of read+write throughput by assuming both happen simultaneously ? Edit: Based on the

Is there a tool to profile sqlite queries?

柔情痞子 提交于 2019-12-17 17:47:40
问题 I am using a SQLite database and would like to speed up my queries, perhaps with indexes or by restructuring them altogether. Is there a tool to profile queries, that might help me decide where things are slowing down? I know I could just enter queries into a tool like SQLite Administrator to time them, but I'm looking for something a bit more systematic than that -- perhaps something that sits in the background and looks at all the queries that I enter over a period, giving a breakdown of

Calculate summary statistics of columns in dataframe

て烟熏妆下的殇ゞ 提交于 2019-12-17 17:39:25
问题 I have a dataframe of the following form (for example) shopper_num,is_martian,number_of_items,count_pineapples,birth_country,tranpsortation_method 1,FALSE,0,0,MX, 2,FALSE,1,0,MX, 3,FALSE,0,0,MX, 4,FALSE,22,0,MX, 5,FALSE,0,0,MX, 6,FALSE,0,0,MX, 7,FALSE,5,0,MX, 8,FALSE,0,0,MX, 9,FALSE,4,0,MX, 10,FALSE,2,0,MX, 11,FALSE,0,0,MX, 12,FALSE,13,0,MX, 13,FALSE,0,0,CA, 14,FALSE,0,0,US, How can I use Pandas to calculate summary statistics of each column (column data types are variable, some columns have

How to profile my code?

我的未来我决定 提交于 2019-12-17 17:29:22
问题 I want to know how to profile my code. I have gone through the docs, but as there were no examples given I could not get anything from it. I have a large code and it is taking so much time, hence I want to profile and increase its speed. I havent written my code in method, there are few in between but not completely. I don't have any main in my code. I want to know how to use profiling. I'm looking for some example or sample code of about how to profile. I tried psyco, i.e just addded two