Hi,

> On 17 Sep 2019, at 13.13, Bruno Tiago Rodrigues 
> <[email protected]> wrote:
> 
> Is there any direct way to extract the current processing time the packet has 
> taken?
> 
> I'm injecting this on seldomly used hook but I'm afraid it does not scale 
> properly once it gets propagated to a production environment:
> 
> my ($seconds, $micro) = &Radius::Util::getTimeHires();
> my $timehires = sprintf("%d.%0$6d",$seconds,$micro);
> my $recvtime = sprintf ("%d.%06d",$r->{RecvTime},$r->{RecvTimeMicros});
> $timehires-=$recvtime;
> #timehires now has the number of elapsed seconds.microseconds since the 
> packet was received
> 
> I had a look at $r->{StatsTrail}, but it seems to show stats for the previous 
> packet.
> 
> Is there any easir (and efficient) way to extract the current packet 
> processing time?
> 

See how $response_time is calculated in replyTo() function in Radius/Client.pm.


BR
-- 
Tuure Vartiainen <[email protected]>

Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
NetWare etc.

_______________________________________________
radiator mailing list
[email protected]
https://lists.open.com.au/mailman/listinfo/radiator

Reply via email to