Skip to content

Instantly share code, notes, and snippets.

View diego-gomez-olvera's full-sized avatar

Diego Gómez Olvera diego-gomez-olvera

  • Booking.com
  • Amsterdam, The Netherlands
View GitHub Profile
/**
* Result of an operation using Apollo. It matches the possible states of a GraphQL response:
* - https://www.apollographql.com/docs/kotlin/essentials/errors#truth-table
* - https://github.com/HedvigInsurance/android/blob/0eb8c4a862644be4dd5beb717c8142666e6ff846/app/apollo/apollo-core/src/commonMain/kotlin/com/hedvig/android/apollo/ApolloCallExt.kt#L106-L127
*/
sealed interface ApolloResult<out T> {
/**
* Response with a valid result.
*/
sealed interface Valid<out T : Any> : ApolloResult<T> {
package com.booking.debug.performance
import android.os.SystemClock
import android.util.Log
/**
* Simple class to check the execution time between several execution points across threads.
* Unlike [TraceCompat](https://developer.android.com/reference/androidx/core/os/TraceCompat)
* it is not expected to 'begin' and 'end' sections but it will just print the time between
* the points being tracked.