HTTP::Promise::Headers::ServerTiming - Server-Timing Header Field
use HTTP::Promise::Headers::ServerTiming; my $srv = HTTP::Promise::Headers::ServerTiming->new || die( HTTP::Promise::Headers::ServerTiming->error, "\n" ); $srv->name( 'cache' ); $srv->dur(2.4); $srv->desc( 'Cache Read' );
v0.1.0
The following is an extract from Mozilla documentation.
The Server-Timing header communicates one or more metrics and descriptions for a given request-response cycle.
Example:
# Single metric without value Server-Timing: missedCache # Single metric with value Server-Timing: cpu;dur=2.4 # Single metric with description and value Server-Timing: cache;desc="Cache Read";dur=23.2 # Two metrics with value Server-Timing: db;dur=53, app;dur=47.2
Returns a string representation of the Server-Timing object.
Server-Timing
Sets or gets the server timing description.
Sets or gets the duration
Sets or gets the server timing metrics name.
Set or get an arbitrary name-value pair attribute.
Set or get multiple name-value parameters.
Calling this without any parameters, retrieves the associated hash object
Jacques Deguest <jack@deguest.jp>
Mozilla documentation
HTTP::Promise, HTTP::Promise::Request, HTTP::Promise::Response, HTTP::Promise::Message, HTTP::Promise::Entity, HTTP::Promise::Headers, HTTP::Promise::Body, HTTP::Promise::Body::Form, HTTP::Promise::Body::Form::Data, HTTP::Promise::Body::Form::Field, HTTP::Promise::Status, HTTP::Promise::MIME, HTTP::Promise::Parser, HTTP::Promise::IO, HTTP::Promise::Stream, HTTP::Promise::Exception
Copyright(c) 2022 DEGUEST Pte. Ltd.
All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install HTTP::Promise, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Promise
CPAN shell
perl -MCPAN -e shell install HTTP::Promise
For more information on module installation, please visit the detailed CPAN module installation guide.