Giter Club home page Giter Club logo

backend-engineering-test's Introduction

"App Analyse Metrics"

Backend Engineering Test

Write a command that generates a metrics summary from a given file. Include some basic statistics: average, min, max, median; and if there were any under-performing periods of download.

Comments and assumptions

These are some of the assumptions when implementing the solution:

  • Extension of file is only json for now
  • All metrics in the file have the same unit: bytes
  • The expected stats metrics will have the same unit: megabits
  • All metrics in the file contain sorted dates from oldest to newest
  • All files contain successful requests with code ok
  • The under-performing periods will be represented by a start and an end date

A list of TODOs was added to the TODO file in the project.

How to install it?

Make sure you set your env variables correctly in a .env file, especially including SUMMARY_OWNER and SUMMARY_VERSION. You can find example of their values defined in the phpunit.xml.dist file

Run the following commands from the project root:

docker-compose build

make resolve-dependencies

Make sure it worked by running the tests or one of the commands on the Makefile. i.e

make test

make analyse-file-one

make analyse-file-one-in-bytes

How to access the container?

Run the command: make shell

How to run the tests?

We'll use only PHPUnit for testing. You can find the classes under ./tests.

For running all tests: make test

backend-engineering-test's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.