Skip to content

Instantly share code, notes, and snippets.

View duy0611's full-sized avatar

Duy Nguyen duy0611

  • Supermetrics
  • Helsinki, Finland
View GitHub Profile
/*
* Implement a function that returns the summary of the current user's latest conversations,
* sorted by the latest message's timestamp (most recent conversation first).
*
* Make sure to have good unit tests in addition to the provided integration test!
*
* You have the following REST API available (base URL provided as a constant):
*
* Get current user's conversations: GET /conversations
* Get messages in a conversation: GET /conversations/:conversation_id/messages
/*
* Our application servers receive approximately 20 000
* http requests per second. Response timeout is 19000ms.
* Implement a statistics collector that calculates the
* median and average request response times for a 7 day
* dataset.
*
* Assigment:
* 1. Implement StatsCollector
* 2. Write tests (below StatsCollector)