Re: [nodejs] process.env.hasOwnProperty

2012-06-22 Thread gjohnson
Object.create(null) ? :-)

On Friday, June 22, 2012 8:02:47 PM UTC-4, Isaac Schlueter wrote:
>
> I somewhat agree with Bert here. 
>
> On the other hand, we just outright block querystrings from having 
> keys named hasOwnProperty, __defineGetter__, etc., and I believe we 
> may do the same for http headers.  We probably ought to make a 
> decision and have them all work the same.  I'd be tempted to maybe add 
> some kind of "not instanceof Object object" goober and use for these 
> cases. 
>
> On Fri, Jun 22, 2012 at 4:58 PM, Ben Noordhuis wrote: 
> > On Fri, Jun 22, 2012 at 7:22 PM, Bert Belder wrote: 
> >> 
> >> 
> >> On Friday, June 22, 2012 6:27:49 PM UTC+2, Ben Noordhuis wrote: 
> >>> 
> >>> `process.env` is not a real JS object. it's a stub for a chunk of C++ 
> >>> code. But by all means file an issue if you feel strongly about this, 
> >>> we can probably fix it. 
> >> 
> >> 
> >> I don't agree. People shouldn't rely on prototype methods of objects 
> that 
> >> are used as hash tables. Same story for the http headers object, parsed 
> >> querystring arguments etc. 
> > 
> > Apparently Bert feels strongly about this. :-) 
> > 
> > -- 
> > Job Board: http://jobs.nodejs.org/ 
> > Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines 
> > You received this message because you are subscribed to the Google 
> > Groups "nodejs" group. 
> > To post to this group, send email to nodejs@googlegroups.com 
> > To unsubscribe from this group, send email to 
> > nodejs+unsubscr...@googlegroups.com 
> > For more options, visit this group at 
> > http://groups.google.com/group/nodejs?hl=en?hl=en 
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


[nodejs] open() syscall errors and friends

2012-05-29 Thread gjohnson
I am attempting to debug random slowness in an application and before I 
google the web too much, I thought I'd ask here:

% time seconds  usecs/call callserrors syscall
-- --- --- - - 
 32.370.027971   2 14698   epoll_wait
 29.500.025491   1 22815   write
 18.920.016346   1 29406   clock_gettime
 13.430.011601   1 14424   read
  4.810.004154  18   229   mmap
  0.360.000311   2   140   munmap
  0.210.000184   452 2 epoll_ctl
  0.180.000152   1   16480 open
  0.120.000106   1   200   futex
  0.100.83   188   close
  0.000.00   084   fstat
  0.000.00   0 4   socket
  0.000.00   0 4 4 connect
  0.000.00   0 8   setsockopt
  0.000.00   0 4   getsockopt
  0.000.00   0 4   uname
  0.000.00   0 8   fcntl
  0.000.00   020   sysinfo
-- --- --- - - 
100.000.086399 8235286 total

The connect() errors stem from redis, but from what I gather a EINPROGRESS 
is not a bad thing...
*[pid  8039] connect(53, {sa_family=AF_INET, sin_port=htons(6379), 
sin_addr=inet_addr("10.24.24.122")}, 16) = -1 EINPROGRESS (Operation now in 
progress)
*

These open() errors confuse me:
*[pid  8032] open("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq", 
O_RDONLY) = -1 ENOENT (No such file or directory)*
*[pid  8032] open("/sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq", 
O_RDONLY) = -1 ENOENT (No such file or directory)*
*[pid  8032] open("/sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_max_freq", 
O_RDONLY) = -1 ENOENT (No such file or directory)*
*[pid  8032] open("/sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_max_freq", 
O_RDONLY) = -1 ENOENT (No such file or directory)*

I was not able to capture the epoll_ctl errors...

Any thoughts? 

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en