web_services: implement os timestamp query.

The os user and sys elapsed times are very useful for performance metrics,
they can tell us how much did the openerp server try for some operation.

Conflicts:

	bin/service/web_services.py

bzr revid: p_christ@hol.gr-20101116162025-go5lx4qs658pt7t5
This commit is contained in:
P. Christeas
2010-11-16 18:20:25 +02:00
parent 3e32b34060
commit cfdd34d511
+4 -1
View File
@@ -385,7 +385,7 @@ class common(_ObjectService):
'login_message','get_stats', 'check_connectivity',
'list_http_services']:
pass
elif method in ['get_available_updates', 'get_migration_scripts', 'set_loglevel']:
elif method in ['get_available_updates', 'get_migration_scripts', 'set_loglevel', 'get_os_time']:
passwd = params[0]
params = params[1:]
security.check_super(passwd)
@@ -567,6 +567,9 @@ GNU Public Licence.
def exp_check_connectivity(self):
return bool(sql_db.db_connect('template1'))
def exp_get_os_time(self):
return os.times()
common()