profiling

How to get consistent results when compare speed of numpy.save and h5py?

让人想犯罪 __ 提交于 2019-12-11 01:03:58
问题 I'm trying to compare the speed efficiency of two tools that would allow to save 2 GB of numpy array to disk into a file : numpy.save and h5py.create_dataset . (Note : this is just a first test, the real case I have to deal with, is several thousands of numpy arrays of size between 1 and 2 MB, ie several GB at the end) Here is the code I use for doing the benchmark. The problem is that the results are really inconsistent : import numpy as np import h5py import time def writemem(): myarray =

Profiling line-by-line in C++

半世苍凉 提交于 2019-12-11 00:57:03
问题 I have a C++ program I am trying to optimize. Since I want it to run fast, I am not using a lot of function calls. Most profiling tool I have seen can give you profiling info in a function-call resolution. However, I would like it in a line-by-line resolution. Is there some option like this? I am using Visual Studio 2010 on Windows. Thanks. 回答1: Intel Parallel Amplifier should be capable of what you want. If that is what you want: 回答2: If you're running with on an AMD processor, CodeAnalyst

starting tomcat from jar file in ubuntu

痴心易碎 提交于 2019-12-11 00:57:01
问题 I am using tomcat for the first time. I have downloaded and unzipped tomcat 7.0.28. I am able to start and shutdown it form the command prompt by ./startup.sh and ./shutdown.sh. So far it works fine. I can see tomcat homepage and examples also in the browser. But what I want is to profile tomcat server with java profiler. For that I want to run it from jar file. Something like java -jar tomcat_allrequiredclasses.jar. Is there any way I can start tomcat server like this ? I tried to run jar

profile linking times with gcc/g++ and ld

三世轮回 提交于 2019-12-11 00:07:36
问题 I'm using g++ to compile and link a project consisting of about 15 c++ source files and 4 shared object files. Recently the linking time more than doubled, but I don't have the history of the makefile available to me. Is there any way to profile g++ to see what part of the linking is taking a long time? Edit: After I noticed that the makefile was using -O3 optimizations all the time, I managed to halve the linking time just by removing that switch. Is there any good way I could have found

stack allocation size using intel pin tool

 ̄綄美尐妖づ 提交于 2019-12-10 23:43:49
问题 I have following c code: #include <stdio.h> int foo() { int a = 4; int *p = &a; printf("%i\n", *p); int b[10]; b[1] = 3; } int main(void) { int a[10], b[20]; a[2] = 7; b[7] = 9; foo(); return 0; } I created following PIN tool: #include <fstream> #include <iostream> #include "pin.H" // Additional library calls go here /*********************/ // Output file object ofstream OutFile; //static uint64_t counter = 0; uint32_t lock = 0; uint32_t unlock = 1; std::string rtin = ""; // Make this lock if

tomcat : How to get opened jdbc:oracle connection's stack trace?

喜你入骨 提交于 2019-12-10 22:31:25
问题 Have a web application running across multiple locations, I can see many connections piling up by running this command on linux: ps -ef|grep LOCAL shows me the count of active oracle connections with process id's, and the connection count has been growing up by 5-7 number every hour. After few hours, application slows down and eventually tomcat server needs to be restarted. As, I am able to see connections growing, Is there any way to get the source of these connections, to find out what

Prolog memory issues

点点圈 提交于 2019-12-10 21:13:11
问题 I'd like to find a way to profile the memory usage of a predicate (a huge one) I've written in prolog. I'm currently running it with swi and yap and I can see from those processes memory consumption that a big chunk of memory gets allocated. The problem is that it does not get deallocated/freed/garbage collected when the predicate terminates (I have to halt the interpreter to see it back) plus the amount of memory only keeps growing while the predicate is running (wheather it shall not since

Can Adobe Flash Builder be used to debug and profile OpenLaszlo SWF10/SWF11 applications?

霸气de小男生 提交于 2019-12-10 20:07:49
问题 I've read that Adobe's Flash Builder 4.0+ supports profiling of ActionScript 3 applications. Is it then possible to use Flash Builder to profile OpenLaszlo SWFx runtime applications accordingly? The conversion of OpenLaszlo's LZX source code into an SWF file happens in multiple steps, and the compiler generates ActionScript source code during this process. How could that source code be used to debug an application inside Flash Builder? Based on what I know about Flash Builder, ActionScript 3

How do I connect to a Java command-line tool with the YourKit Java Profiler?

↘锁芯ラ 提交于 2019-12-10 19:55:43
问题 I've build a command-line tool in Java, which I would now like to profile with YourKit. I launch the command-line tool with something like: $ java -classpath .:foo.bar.jar com.foobar.tools.TheTool arg1 arg2 arg3 It runs to completion in less than 2 seconds. After reading http://www.yourkit.com/docs/80/help/agent.jsp, I tried the following: $ java -agentpath:/home/dspitzer/yjp-8.0.24/bin/linux-x86-32/libyjpagent.so -classpath .:foo.bar.jar com.foobar.tools.TheTool arg1 arg2 arg3 ...and I get:

Timing execution of OpenCL kernels

人盡茶涼 提交于 2019-12-10 19:50:56
问题 Is this a correct way of timing kernel execution time for OpenCL? I am quite keen on using the c++ wrapper (which unfortunately does not have many examples of timings). cl::CommandQueue queue(context, device, CL_QUEUE_PROFILING_ENABLE, &err); checkErr(err, "Cannot create the command queue"); /* Warm-up */ for (unsigned i = 0; i < NUMBER_OF_ITERATIONS; ++i) { err = queue.enqueueNDRangeKernel(kernel, cl::NullRange, cl::NDRange(512), cl::NullRange, NULL, NULL); checkErr(err, "Cannot enqueue the