Skip to content

PanosBant/timings-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timings-client

This is a Java client for the GoDaddy/timings application. It was developed against the timings-docker containers.

Assumptions

When you have IntelliJ

  • Import as a Maven project.

Rest Assured

Including in a Java Project

  • Build it locally using mvn package.
  • Publish it to your local Maven repository using this. -- Example: mvn install:install-file -Dfile=./target/timings-client-1.0-SNAPSHOT.jar -DpomFile=pom.xml
  • Or you can add the dependency to your Maven POM.
<dependency>
    <groupId>com.kevingann</groupId>
    <artifactId>timings-client</artifactId>
    <version>0.7-SNAPSHOT</version>
</dependency>

InjectJS Object

The GoDaddy/timings application leverages the Web Performance API available in most browsers.

Here's an example of what's being injected to obtain performance data.

var visualCompleteTime = 0;
  if (performance.getEntriesByName('initialPageLoad').length) {
      visualCompleteTime = parseInt(performance.getEntriesByName('initialPageLoad')[0].startTime);
      window.performance.clearMarks();
  };
  return {
      time:new Date().getTime(),
      timing:window.performance.timing,
      visualCompleteTime: visualCompleteTime,
      url: document.location.href,
      resources: window.performance.getEntriesByType('resource')
  };

NavigationTimingResponse Object

Refer to Web Performance API to understand the data being returned.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%