Friday 01 July 2011 2:55:46 pm
By : Steven E. Bailey
Here's code that I've used in a bunch of places - especially for automated syncing scripts:
You have to run this from the ez root directory.
#!/bin/bash getinidbinfo () { dbinfo=`php -r "require 'autoload.php'; \\$script = eZScript::instance( array( 'debug-message' => '', 'use-session' => true, 'use-modules' => true, 'use-extensions' => true ) ); \\$script->startup(); \\$script->setUseSiteAccess( '${1}' ); \\$script->initialize(); \\$ini = eZINI::instance(); \\$database=\\$ini->variable( 'DatabaseSettings', 'Database' ); \\$user=\\$ini->variable( 'DatabaseSettings', 'User' ); \\$password=\\$ini->variable( 'DatabaseSettings', 'Password' ); \\$script->shutdown(); echo \\$database.':'.\\$user.':'.\\$password;"` remote_db=${remote_db:-`echo $dbinfo|cut -f1 -d":"`} remote_db_user=${remote_db_user:-`echo $dbinfo|cut -f2 -d":"`} remote_db_passwd=${remote_db_passwd:-`echo $dbinfo|cut -f3 -d":"`} } getinidbinfo $* echo $remote_db $remote_db_user $remote_db_passwd
Timing: | Jan 17 2025 23:44:07 |
Script start | |
Timing: | Jan 17 2025 23:44:07 |
Module start 'layout' | |
Timing: | Jan 17 2025 23:44:07 |
Module start 'content' | |
Timing: | Jan 17 2025 23:44:07 |
Module end 'content' | |
Timing: | Jan 17 2025 23:44:07 |
Script end |
Total runtime | 0.0906 sec |
Peak memory usage | 6,144.0000 KB |
Database Queries | 42 |
Checkpoint | Start (sec) | Duration (sec) | Memory at start (KB) | Memory used (KB) |
---|---|---|---|---|
Script start | 0.0000 | 0.0071 | 588.1641 | 152.6563 |
Module start 'layout' | 0.0071 | 0.0035 | 740.8203 | 39.5156 |
Module start 'content' | 0.0106 | 0.0786 | 780.3359 | 350.7891 |
Module end 'content' | 0.0892 | 0.0014 | 1,131.1250 | 15.7031 |
Script end | 0.0906 | 1,146.8281 |
Accumulator | Duration (sec) | Duration (%) | Count | Average (sec) |
---|---|---|---|---|
Ini load | ||||
Load cache | 0.0031 | 3.4355 | 15 | 0.0002 |
Check MTime | 0.0013 | 1.4005 | 15 | 0.0001 |
Mysql Total | ||||
Database connection | 0.0010 | 1.0580 | 1 | 0.0010 |
Mysqli_queries | 0.0432 | 47.6726 | 42 | 0.0010 |
Looping result | 0.0004 | 0.4627 | 40 | 0.0000 |
Template Total | 0.0527 | 58.1 | 2 | 0.0264 |
Template load | 0.0022 | 2.4272 | 2 | 0.0011 |
Template processing | 0.0505 | 55.7077 | 2 | 0.0252 |
Template load and register function | 0.0001 | 0.1247 | 1 | 0.0001 |
states | ||||
state_id_array | 0.0007 | 0.7305 | 1 | 0.0007 |
state_identifier_array | 0.0017 | 1.8858 | 2 | 0.0009 |
Override | ||||
Cache load | 0.0018 | 1.9482 | 8 | 0.0002 |
Sytem overhead | ||||
Fetch class attribute name | 0.0030 | 3.2569 | 3 | 0.0010 |
class_abstraction | ||||
Instantiating content class attribute | 0.0000 | 0.0076 | 3 | 0.0000 |
General | ||||
dbfile | 0.0007 | 0.7221 | 10 | 0.0001 |
String conversion | 0.0000 | 0.0121 | 4 | 0.0000 |
Note: percentages do not add up to 100% because some accumulators overlap |
Usage | Requested template | Template | Template loaded | Edit | Override |
---|---|---|---|---|---|
1 | node/view/full.tpl | blog_entry/full.tpl | extension/community_design/design/suncana/override/templates/blog_entry/full.tpl | ||
2 | content/datatype/view/ezxmltext.tpl | <No override> | extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tpl | ||
2 | content/datatype/view/ezxmltags/paragraph.tpl | <No override> | extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tpl | ||
1 | content/datatype/view/ezxmltags/literal.tpl | <No override> | extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tpl | ||
1 | content/datatype/view/ezkeyword.tpl | <No override> | extension/community_design/design/suncana/templates/content/datatype/view/ezkeyword.tpl | ||
1 | print_pagelayout.tpl | <No override> | extension/community/design/community/templates/print_pagelayout.tpl | ||
Number of times templates used: 8 Number of unique templates used: 6 |
Time used to render debug report: 0.0001 secs