apm::metrics (public)

 apm::metrics -package_key package_key -file_type file_type \
    [ -array array ]

Defined in packages/acs-tcl/tcl/apm-procs.tcl

Return some code metrics about the files in package $package_key. This will return an array or dict containing at least the following items:

  • count - the number of files
  • lines - the number of lines in the files
  • blank_lines - the number of blank lines in the files
  • comment_lines - the number of blank lines in the files
  • procs - the number of procs, if applicable (0 if not applicable)

Valid file_type's:

  • data_model_pg - PG datamodel files
  • data_model_ora - Oracle datamodel files
  • include_page - ADP files in package_key/lib
  • content_page - ADP files in package_key/www
  • tcl_procs - Tcl procs in package_key/tcl
  • test_procs - automated tests in package_key/tcl/test
  • documentation - docs in package_key/www/doc
When the array is provided, it will be used for setting the result. Otherwise a dict with the metrics information is returned. This proc is cached.

Switches:
-package_key (required)
The package_key of interest
-file_type (required)
See options above
-array (optional)
variable to hold the array that will be returned
Author:
Vinod Kurup
Created:
2006-02-09

Partial Call Graph (max 5 caller/called nodes):
%3 apm::metrics_internal apm::metrics_internal (private) util_memoize util_memoize (public) apm::metrics apm::metrics apm::metrics->apm::metrics_internal apm::metrics->util_memoize

Testcases:
No testcase defined.
Source code:
    set data [util_memoize [list apm::metrics_internal $package_key $file_type]]
    if {[info exists array]} {
        upvar $array metrics
        array set metrics $data
    }
    return $data
Generic XQL file:
packages/acs-tcl/tcl/apm-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/apm-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/apm-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: