bnoordhuis/node-profiler

cannot require profiler

ryan65 opened this issue · 6 comments

Hi
just started with this tool. in installed and added var profiler = require('profiler');
I get this error.

Error: %1 is not a valid Win32 application.
C:\Work\V8Tests\node_modules\profiler\build\Release\profiler.node
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\Work\V8Tests\test2.js:17:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

That probably means the add-on was built for the wrong architecture, e.g. that the add-on was compiled as 64 bits code whereas your node.exe is 32 bits (or vice versa.)

On a general note, I would advise against using node-profiler going forward. V8 removed much of the machinery that node-profiler needs to function (e.g. --prof_lazy) so it's much less effective now. It should still work with v0.10 but once v0.12 comes out, it's probably going to be irreparably broken. I'll add a deprecation notice to the documentation.

Hi Ben
Thanks , my node.exe is 64 bit and I just did npm install to profiler so how do I get the profiler 64 bit.
Anyway can you point me out to other good profiling tools you recommend where I can control when to start or pause the profiler and alo tools that can help me analyze the results in any easy way , maybe even graphical .
Thanks.

If you want start/stop functionality and pretty graphs, I'd be remiss if I didn't mention our strong-agent product (I'm a StrongLoop founder.)

There are a number of other tools out there but most are UNIX CLI only, probably not what you want.

Hi
Has a matter of fact I did want to try it out but after installing and everything , I tried to run the sample and got some tunneling error when doing the command slc strongops
[Error: tunneling socket could not be established, cause=connect ECONNREFUSED] code: 'ECONNRESET' }
All the proxy env is Ok and I couldnt really find any acceptable answer on the net so I gave up. I am behind firewall but I never saw this problem before.

Proxies are a perennial issue, that's definitely true. 2/3rd of the support issues we get are from people trying to get through a corporate firewall or proxy.

For strong-agent to work, you need a proxy that supports chunked encoding, like squid >= 3.2.

I think we'll eventually start supporting the HTTP CONNECT method for tunneling through proxies but that's complicated right now because node's built-in http module doesn't handle CONNECT well, see e.g. nodejs/node-v0.x-archive#7019.

FYI, the next release of strong-agent or the one after that will have better proxy support; the PR is under review right now. You may want to keep an eye on https://www.npmjs.org/package/strong-agent and update when it's out.