Giter VIP home page Giter VIP logo

unomok_practical_task's Introduction

Unomok Practical Task

This project is a Node.js application that analyzes log data from a file and provides insights into API endpoints, HTTP status codes, and API calls per minute. You can use different commands to generate specific reports based on the log data.

Example output

sample output

Note:

Edit index.ts file to provide path of log file or use filepath arg in the command line as mentioned below

Installation

Before running this project, make sure you have Node.js and npm (Node Package Manager) installed on your system. You'll also need TypeScript to run the code.

To install the required dependencies, open your terminal and navigate to the project directory. Then, run the following command:

npm install

Usage

Analyzing Log Data

To analyze log data and generate reports, use the following command:

npm start

This command reads the log data from the default file path (./data/prod-api-prod-out.log) and provides a summary of API endpoints, HTTP status codes, and API calls per minute.

Generating Specific Reports

You can generate specific reports using the following commands:

  • Endpoint Report:

npm run endpoints

This command generates a report of API endpoints and their usage.

  • Status Code Report:

npm run statuscodes

This command generates a report of HTTP status codes and their counts.

  • Minute-wise API Calls Report:

npm run minutes

This command generates a report of API calls per minute.

Customizing the Log File

By default, the application reads log data from ./data/prod-api-prod-out.log. If you have a different log file to analyze, you can specify the file path using the filepath option. For example:

npm start filepath=path/to/your/logfile.log

unomok_practical_task's People

Contributors

anushka7310 avatar

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.