Benchmarks Used in Evaluation


The table below contains the original and the instrumented versions of each benchmark application used in the evaluation of Kuber. In our instrumentation, we added traces to each API to calculate the execution time of the API while subtracting the execution times of the APIs it triggers.

Benchmark NameNumber of ServicesOrginal RepoChanged Repo
Hotel Reservation8linklink
Media Microsvc11linklink
Social Network12linklink
Sockshop7linklink

An example of the instrumented GET API of the Catalogue service in the SockShop application is below. Here, we subtract the response time of the database call from the API execution time.

 
 // Original API definition
func (s *catalogueService) Get(id string) (Sock, error) {   
        // other code
        err := s.db.Get(&sock, query, id)
        // other code
        return sock, nil
}
 
 // API definition with execution time calculations 
func (s *catalogueService) Get(id string) (Sock, error) {
      start := time.Now() // <- Start Timer for API Total Execution time
      elapsed_external_call_time := time.Duration(0)
      span := opentracing.StartSpan("Get")

      // Other code
 
      external_call_2 := time.Now()
      err := s.db.Get(&sock, query, id)  // <- External Call
      elapsed_external_call_time = elapsed_external_call_time + time.Since(external_call_2)

      // Other code
      
      elapsed := time.Since(start) // <- end Timer for API Total Execution time
      elapsed = elapsed - elapsed_external_call_time
      span.LogKV("runtime_ms",float64(elapsed)/float64(time.Millisecond)) // <- send data to Istio
      span.Finish()
      return sock, nil
}