• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

Speedtest

Speedtest tests the network speed of your server. It captures download, upload, ping and jitter speed and provides the results in an Ajax callback.

Speedtest Tag Documentation

Speedtest allows to measure the network speed.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
widgetVar String false generated ('widget_' + componentClientId) Name of the client side widget.
captionDownload String false Download Caption for Download gauge.
captionJitter String false Jitter Caption for Jitter gauge.
captionPing String false Ping Caption for Ping gauge.
captionUpload String false Upload Caption for Upload gauge.
colorDownload String false #339933 Color for Download gauge.
colorJitter String false #d2900a Color for Jitter gauge.
colorPing String false #993333 Color for Ping gauge.
colorUpload String false #333399 Color for Upload gauge.
file String true URL to the file used for testing (should be some megabytes).
style String false Inline style of the component.
styleClass String false Style class of the component.
Tag Documentation Widget Source
Basic Usage

Start the test with the start() method of the widget. The speed results are sent to the server.

Dummy load file

For testing the download speed you need an uncompressable payload file deployed on your server with a size of 1MB, 2MB, 5MB or 10MB. We recommend using a 5MB file. It can be generated here.

Usage


<div class="card">
    <h5>Basic Usage</h5>
    <p>Start the test with the <code>start()</code> method of the widget. The speed results are sent to the server.</p>
    <h:form id="formBasicUsage">
        <p:growl id="growl" showDetail="true" showSummary="true"/>

        <pe:speedtest id="speedtest" widgetVar="speedtest" bgColor="#65ed28" captionDownload="Down" captionUpload="Up"
                      captionJitter="Jitter" captionPing="Ping" file="#{request.contextPath}/resources/other/dummy.payload">
            <p:ajax listener="#{speedTestController.saveResults}" process="@this" update="growl"/>
        </pe:speedtest>

        <div>
            <p:commandButton id="btnStart" value="Start Speedtest" icon="pi pi-play" style="width:100%;"
                             onclick="PF('speedtest').start();"/>
        </div>
    </h:form>
</div>

<div class="card">
    <h5>Dummy load file</h5>
    <p>For testing the download speed you need an uncompressable payload file deployed on your server with a size of 1MB, 2MB, 5MB
        or 10MB. We recommend using a 5MB file. It can be generated here.</p>
    <h:form id="formPayload">
        <div class="flex flex-column gap-3">
            <p:outputLabel value="Size in MB" for="SizeInMB"/>
            <p:selectOneMenu id="SizeInMB" value="#{speedTestController.sizeInMB}">
                <f:selectItem itemLabel="Select size" itemValue="" noSelectionOption="true" itemDisabled="true"/>
                <f:selectItem itemLabel="1MB" itemValue="1"/>
                <f:selectItem itemLabel="2MB" itemValue="2"/>
                <f:selectItem itemLabel="5MB" itemValue="5"/>
                <f:selectItem itemLabel="10MB" itemValue="10"/>
                <p:ajax listener="#{speedTestController.updateSizeInMB()}" update="@this"/>
            </p:selectOneMenu>
            <p:commandButton value="Generate speedtest dummy load file" ajax="false"
                             action="#{speedTestController.downloadPayloadFile()}"/>
        </div>
    </h:form>
</div>