NAME

HTTP::Promise::Headers::ServerTiming - Server-Timing Header Field

SYNOPSIS

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' );

VERSION

v0.1.0

DESCRIPTION

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

METHODS

as_string

Returns a string representation of the Server-Timing object.

desc

Sets or gets the server timing description.

dur

Sets or gets the duration

name

Sets or gets the server timing metrics name.

param

Set or get an arbitrary name-value pair attribute.

params

Set or get multiple name-value parameters.

Calling this without any parameters, retrieves the associated hash object

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

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 & LICENSE

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.