Skip to content

Commit

Permalink
Build results of e9f2446 (on master)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanick committed Jun 10, 2011
2 parents ff17d3c + e9f2446 commit ea4b166
Show file tree
Hide file tree
Showing 9 changed files with 215 additions and 52 deletions.
5 changes: 4 additions & 1 deletion Build.PL
Expand Up @@ -25,16 +25,19 @@ my %module_build_args = (
'Yanick Champoux <yanick@babyl.dyndns.org>'
],
'dist_name' => 'Catalyst-Plugin-MemoryUsage',
'dist_version' => '0.1.1',
'dist_version' => '0.2.0',
'license' => 'perl',
'module_name' => 'Catalyst::Plugin::MemoryUsage',
'recommends' => {},
'recursive_test_files' => 1,
'requires' => {
'Devel::CheckOS' => '0',
'List::Util' => '0',
'MRO::Compat' => '0',
'Memory::Usage' => '0',
'Moose::Role' => '0',
'Number::Bytes::Human' => '0',
'Text::SimpleTable' => '0',
'namespace::autoclean' => '0'
},
'script_files' => []
Expand Down
22 changes: 13 additions & 9 deletions Changes
@@ -1,15 +1,19 @@
Revision history for Catalyst::Plugin::MemoryUsage

0.1.1 2010-12-09 23:34:59 America/Montreal
* Add support for NetBSD.
0.2.0 2011-06-09
[ENHANCEMENTS]
- Report now use Text::SimpleTable

0.1.0 2010-12-09 21:25:39 America/Montreal
* If the OS is not Linux, issue a warning and don't active the plugin.
0.1.1 2010-12-09T23:34:59Z
- Add support for NetBSD.

0.0.2 2010-11-29 20:41:21 America/Montreal
* Flesh out the documentation a little bit.
* Add a test.
0.1.0 2010-12-09T21:25:39Z
- If the OS is not Linux, issue a warning and don't active the plugin.

0.0.1 2010-11-28 23:05:10 America/Montreal
* First release on an unsuspecting world.
0.0.2 2010-11-29T20:41:21Z
- Flesh out the documentation a little bit.
- Add a test.

0.0.1 2010-11-28T23:05:10Z
- First release on an unsuspecting world.

1 change: 1 addition & 0 deletions MANIFEST
Expand Up @@ -5,6 +5,7 @@ MANIFEST
META.json
META.yml
README
README.mkdn
SIGNATURE
lib/Catalyst/Plugin/MemoryUsage.pm
t/000-report-versions.t
Expand Down
8 changes: 6 additions & 2 deletions META.json
Expand Up @@ -27,9 +27,12 @@
"runtime" : {
"requires" : {
"Devel::CheckOS" : 0,
"List::Util" : 0,
"MRO::Compat" : 0,
"Memory::Usage" : 0,
"Moose::Role" : 0,
"Number::Bytes::Human" : 0,
"Text::SimpleTable" : 0,
"namespace::autoclean" : 0
}
},
Expand All @@ -49,7 +52,7 @@
"provides" : {
"Catalyst::Plugin::MemoryUsage" : {
"file" : "lib/Catalyst/Plugin/MemoryUsage.pm",
"version" : "v0.1.1"
"version" : "v0.2.0"
}
},
"release_status" : "stable",
Expand All @@ -65,6 +68,7 @@
"web" : "http://github.com/yanick/Catalyst-Plugin-MemoryUsage/tree"
}
},
"version" : "0.1.1"
"version" : "0.2.0",
"x_authority" : "cpan:yanick"
}

8 changes: 6 additions & 2 deletions META.yml
Expand Up @@ -24,15 +24,19 @@ name: Catalyst-Plugin-MemoryUsage
provides:
Catalyst::Plugin::MemoryUsage:
file: lib/Catalyst/Plugin/MemoryUsage.pm
version: v0.1.1
version: v0.2.0
requires:
Devel::CheckOS: 0
List::Util: 0
MRO::Compat: 0
Memory::Usage: 0
Moose::Role: 0
Number::Bytes::Human: 0
Text::SimpleTable: 0
namespace::autoclean: 0
resources:
bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-MemoryUsage
homepage: http://search.cpan.org/dist/Catalyst-Plugin-MemoryUsage/
repository: git://github.com/yanick/Catalyst-Plugin-MemoryUsage.git
version: 0.1.1
version: 0.2.0
x_authority: cpan:yanick
28 changes: 15 additions & 13 deletions README
Expand Up @@ -2,7 +2,7 @@ NAME
Catalyst::Plugin::MemoryUsage - Profile memory usage of requests

VERSION
version 0.1.1
version 0.2.0

SYNOPSIS
In YourApp.pm:
Expand All @@ -29,18 +29,20 @@ DESCRIPTION
"Catalyst::Plugin::MemoryUsage" adds a memory usage profile to your
debugging log, which looks like this:

[debug] memory usage of request
time vsz ( diff) rss ( diff) shared ( diff) code ( diff) data ( diff)
0 45304 ( 45304) 38640 ( 38640) 3448 ( 3448) 1112 ( 1112) 35168 ( 35168) preparing for the request
0 45304 ( 0) 38640 ( 0) 3448 ( 0) 1112 ( 0) 35168 ( 0) after Galuga::Controller::Root : _BEGIN
0 45304 ( 0) 38640 ( 0) 3448 ( 0) 1112 ( 0) 35168 ( 0) after Galuga::Controller::Root : _AUTO
0 46004 ( 700) 39268 ( 628) 3456 ( 8) 1112 ( 0) 35868 ( 700) finished running iffy code
0 46004 ( 0) 39268 ( 0) 3456 ( 0) 1112 ( 0) 35868 ( 0) after Galuga::Controller::Entry : entry/index
0 46004 ( 0) 39268 ( 0) 3456 ( 0) 1112 ( 0) 35868 ( 0) after Galuga::Controller::Root : _ACTION
1 47592 ( 1588) 40860 ( 1592) 3468 ( 12) 1112 ( 0) 37456 ( 1588) after Galuga::View::Mason : Galuga::View::Mason->process
1 47592 ( 0) 40860 ( 0) 3468 ( 0) 1112 ( 0) 37456 ( 0) after Galuga::Controller::Root : end
1 47592 ( 0) 40860 ( 0) 3468 ( 0) 1112 ( 0) 37456 ( 0) after Galuga::Controller::Root : _END
1 47592 ( 0) 40860 ( 0) 3468 ( 0) 1112 ( 0) 37456 ( 0) after Galuga::Controller::Root : _DISPATCH
[debug] memory usage of request
.--------------------------------------------------+------+------+------+------+------+------+------+------+------+------.
| | vsz | del- | rss | del- | sha- | del- | code | del- | data | del- |
| | | ta | | ta | red | ta | | ta | | ta |
+--------------------------------------------------+------+------+------+------+------+------+------+------+------+------+
| preparing for the request | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/_BEGIN | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/_AUTO | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| in the middle of index | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/index | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/_ACTION | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/_END | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/_DISPATCH | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
'--------------------------------------------------+------+------+------+------+------+------+------+------+------+------'

METHODS
"memory_usage()"
Expand Down
100 changes: 100 additions & 0 deletions README.mkdn
@@ -0,0 +1,100 @@
# NAME

Catalyst::Plugin::MemoryUsage - Profile memory usage of requests

# VERSION

version 0.2.0

# SYNOPSIS

In YourApp.pm:

package YourApp;

use Catalyst qw/
MemoryUsage
/;

In a Controller class:

sub foo :Path( '/foo' ) {
# ...

something_big_and_scary();

$c->memory_usage->record( 'finished running iffy code' );

# ...
}

# DESCRIPTION

`Catalyst::Plugin::MemoryUsage` adds a memory usage profile to your debugging
log, which looks like this:

[debug] memory usage of request
.--------------------------------------------------+------+------+------+------+------+------+------+------+------+------.
| | vsz | del- | rss | del- | sha- | del- | code | del- | data | del- |
| | | ta | | ta | red | ta | | ta | | ta |
+--------------------------------------------------+------+------+------+------+------+------+------+------+------+------+
| preparing for the request | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/_BEGIN | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/_AUTO | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| in the middle of index | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/index | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/_ACTION | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/_END | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
| after TestApp::Controller::Root : root/_DISPATCH | 28M | | 22M | | 2.2M | | 1.1M | | 20M | |
'--------------------------------------------------+------+------+------+------+------+------+------+------+------+------'

# METHODS

## `memory_usage()`

Returns the [Memory::Usage](http://search.cpan.org/perldoc?Memory::Usage) object available to the context.

To record more measure points for the memory profiling, use the `record()`
method of that object:

sub foo :Path {
my ( $self, $c) = @_;

...

big_stuff();

$c->memory_usage->record( "done with big_stuff()" );

...
}

## `reset_memory_usage()`

Discards the current `Memory::Usage` object, along with its recorded data,
and replaces it by a shiny new one.

# BUGS AND LIMITATIONS

`Memory::Usage`, which is the module `Catalyst::Plugin::MemoryUsage` relies
on to get its statistics, only work for Linux-based platforms. Consequently,
for the time being `Catalyst::Plugin::MemoryUsage` only work on Linux and
NetBSD. This being said, patches are most welcome. :-)

# SEE ALSO

[Memory::Usage](http://search.cpan.org/perldoc?Memory::Usage)

# AUTHOR

Yanick Champoux <yanick@babyl.dyndns.org>

# COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Yanick Champoux.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
21 changes: 11 additions & 10 deletions SIGNATURE
Expand Up @@ -14,14 +14,15 @@ not run its Makefile.PL or Build.PL.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

SHA1 9bcb097b51147f61ea3c2cb13d5d6016d0a19b8e Build.PL
SHA1 ebdbd1e4c9dd01a022eedb7b5aa56f2a43ee263e Changes
SHA1 a2bbd1a9f2d93c2078ab6879b4a9b8e5f8cab9dd Build.PL
SHA1 399c6cba5f210c5f631c84fd59825a8a112e1d65 Changes
SHA1 3ee0d276167c367325eebe1d5ec9877ade504d93 LICENSE
SHA1 30f6bacd016e8de3070c23c603077c3f71897c47 MANIFEST
SHA1 15bad114040ccdeedcf3fe52582bd83488e246ae META.json
SHA1 b8ccd58dfdf07398670a8f3a7991694b6ca676a3 META.yml
SHA1 66920d45c7c7a139c956dc66570b9c6be04ac9e4 README
SHA1 7f69a87dd3e5f271c8a8b5b1e57e3766650178b5 lib/Catalyst/Plugin/MemoryUsage.pm
SHA1 6bf5bd4f8be05556f78c1ba88154e232075df775 MANIFEST
SHA1 504dc50bf489af87cc9d5f092176c0bed5c175cc META.json
SHA1 cf89f159d3874bb436676ebcf70babdf39d84c31 META.yml
SHA1 68f9373ece4f5eb126185e68f2ed78746c19426e README
SHA1 8d1963528f0804d61fc92bae07436fe703564cce README.mkdn
SHA1 773f05ee07742f7ab08456c52b51a6c1f1c412ed lib/Catalyst/Plugin/MemoryUsage.pm
SHA1 050aa113e828a52db3c86065c0c0ed50198b7ce8 t/000-report-versions.t
SHA1 64e87bcc8fd3516cc6a60cbda61661ae89e96e9a t/basic_app.t
SHA1 579bfe1fb8b92f492eba9a177695e6cc5a6ba3b7 t/lib/TestApp.pm
Expand All @@ -30,7 +31,7 @@ SHA1 afac7b65200ae7161431bfe87dbce7b6ccdf72cc t/not-supported.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk0BrfkACgkQ34Hwf+GwC4zjZQCg7bGs4a2vZO5VWErzK9Jj36KO
BIsAnRGBzJBBN6foJVepZOraO5sKQOhc
=euqs
iEYEARECAAYFAk3xaCsACgkQ34Hwf+GwC4xWFgCglxN0x78hswrYe016bAtvzpaa
8dcAoO6cbiMbaeS4UR/WcCPjjcTffIi+
=pmmj
-----END PGP SIGNATURE-----

0 comments on commit ea4b166

Please sign in to comment.