Flag to enable/disable driver through configuration

1 view
Skip to first unread message

Patrick ALLAERT

unread,
Apr 6, 2010, 12:10:10 PM4/6/10
to apm-dev
Hello list,

Can you please review the attached patch?
It implements the subject of this mail.

Cheers,
--
Patrick Allaert
---
http://code.google.com/p/peclapm/ - Alternative PHP Monitor

enable_flag.diff

Paul Dragoonis

unread,
Apr 7, 2010, 5:33:19 AM4/7/10
to apm...@googlegroups.com
Yes we definitely need this enabled flag
apm_sqlite3.enabled
apm_mysql.enabled

I'd like to take a crack at doing the email driver if that's OK with you guys ?

Regards,
-- 
Paul Dragoonis
Software Engineer
drag...@php.net




--
You received this message because you are subscribed to the Google Groups "Alternative PHP Monitor - Dev" group.
To post to this group, send email to apm...@googlegroups.com.
To unsubscribe from this group, send email to apm-dev+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/apm-dev?hl=en.





Paul Dragoonis

unread,
Apr 7, 2010, 5:42:23 AM4/7/10
to apm...@googlegroups.com
Actually i noticed this code in the last patch Patrick..

STD_PHP_INI_BOOLEAN("apm.mysql_enabled",  "1", PHP_INI_PERDIR,    OnUpdateBool,   enabled,     zend_apm_mysql_globals, apm_mysql_globals)

We shouldn't enable any drivers by default. This will result in more overhead and more chance of misconfiguration.

It should be "0" by default.

Regards,
-- 
Paul Dragoonis
Software Engineer
drag...@php.net

Patrick ALLAERT

unread,
Apr 7, 2010, 5:57:29 AM4/7/10
to apm...@googlegroups.com
2010/4/7 Paul Dragoonis <drag...@gmail.com>:

[snip]

> I'd like to take a crack at doing the email driver if that's OK with you
> guys ?

Seems ok to me.

However explain first how you are going to implement it, we probably
don't want to slow down things by sending e-mail synchronously at
every single event.
What about an aggregated e-mail at RSHUTDOWN flushing all events
registered by apm_email_insert_event() into single linked list of
events?

I think discussing it is a good start :)

Patrick

Paul Dragoonis

unread,
Apr 7, 2010, 6:14:42 AM4/7/10
to apm...@googlegroups.com
I think discussing email driver functionality is a good idea too as it will be quite different from the others..
I'm focusing on getting this MySQL driver out of the door.

I've noticed a few things here.
STD_PHP_INI_ENTRY("apm.mysql_port", "0", PHP_INI_PERDIR, OnUpdateLong, db_port, zend_apm_mysql_globals, apm_mysql_globals)

I think the default value for this should be the default mysql port which is 3306.

Is it OK for me to change apm.mysql_enabled default to "0" and apm.mysql_port to "3306" default.

Regards,
--
Paul Dragoonis
Software Engineer
drag...@php.net
Reply all
Reply to author
Forward
0 new messages