Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: users

Measuring overall "size" of sessions

 

 

Interchange users RSS feed   Index | Next | Previous | View Threaded


lists at gmnet

Nov 25, 2009, 8:21 AM

Post #1 of 3 (847 views)
Permalink
Measuring overall "size" of sessions

Hi,

I would like to do some testing and I am wondering if there is a simple
way to find the "size" of a particular session in terms of the total
size of all the variables that are set, and maybe display in somewhere
in the page. For example, I have lots of fly pages and I am setting
some variables on each display. I want to see the total size of all
those variables set for given session at a given time.

Thanks
Rick




--
This message has been scanned for viruses and
dangerous content by Green Mountain Network, and is
believed to be clean.


_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


gert at 3edge

Nov 25, 2009, 11:32 AM

Post #2 of 3 (765 views)
Permalink
Re: Measuring overall "size" of sessions [In reply to]

> -----Original Message-----
> From: interchange-users-bounces [at] icdevgroup [mailto:interchange-
> users-bounces [at] icdevgroup] On Behalf Of Rick Bragg
> Sent: Wednesday, November 25, 2009 6:21 PM
> To: interchange-users [at] icdevgroup
> Subject: [ic] Measuring overall "size" of sessions
>
> Hi,
>
> I would like to do some testing and I am wondering if there is a simple
> way to find the "size" of a particular session in terms of the total
> size of all the variables that are set, and maybe display in somewhere
> in the page. For example, I have lots of fly pages and I am setting
> some variables on each display. I want to see the total size of all
> those variables set for given session at a given time.
>
> Thanks
> Rick

I've a simple script in case I want to look into someone's session, which in
my case is stored on disk.
Perhaps it's a start ...

#!/my/path/to/perl

use Storable;
use Data::Dumper;

my $id = $ARGV[0];
my $d1 = substr($id,0,1);
my $d2 = substr($id,1,1);

my $root = "/my/path/to/session/dir";

print Dumper(retrieve("$root/$d1/$d2/$id"));

-------
If I then do ./readsession.pl sessionid:IPaddress

It dumps the content of the session. You can of course play around with the
results instead of dumping it.

CU,

Gert








_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


pajamian at pajamian

Nov 25, 2009, 3:41 PM

Post #3 of 3 (773 views)
Permalink
Re: Measuring overall "size" of sessions [In reply to]

On 26/11/09 05:21, Rick Bragg wrote:
> Hi,
>
> I would like to do some testing and I am wondering if there is a simple
> way to find the "size" of a particular session in terms of the total
> size of all the variables that are set, and maybe display in somewhere
> in the page. For example, I have lots of fly pages and I am setting
> some variables on each display. I want to see the total size of all
> those variables set for given session at a given time.

Assuming that by "session" you mean the values space and by "size" you
mean the total length of all variables concatenated together then the
following code should do it:
[calcn]
my $total_length = 0;
foreach (values %$Values) {
$total_length += length;
}
return $Total_length;
[/calcn]


Peter

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Interchange users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.