Giter Site home page Giter Site logo

kibana_analyze's Introduction

Kibana Source Code Analysis

This is a small weekend project analyzing the source code of kibana on a file/LOC basis and visualizing the results in kibana.

Run it

  • Check out this repo: git clone [email protected]:flash1293/kibana_analyze.git
  • Check out kibana besides this repo: [email protected]:elastic/kibana.git
  • Start a local elasticsearch / kibana instance (you can use docker-compose up)
  • Install dependencies (yarn install)
  • Collect data node index.js (this may take a while)
  • Import the dashboards and visualizations from dashboards.json
  • Look at the data in your kibana instance

Current State (Latest Tag)

Current State

History

History

React Implementations of Directives

React Implementations of Angular Directives

Data

The script checks out the last 80 tags of the repo and collects for each tag the following values for each file:

  • Lines of code (separated by comment, code, mixed, ...) as provided by the sloc lib
  • Filename
  • Path of directories (dir0, dir1, ... dirN)
  • File extension
  • Whether it is a unit test file
  • Whether it references the AngularJs ui module
  • Whether it defines an angular directive, controller or service
  • Whether it uses ngReact
  • Git tag

Running index.js prunes the index and collects everything again.

Improvement TODOs

  • Incremental index build
  • Collect for each commit (or each n commits of master)
  • Separate collection for code changes instead of files at a given time (the current data doesn't reflect whether existing LOCs has been changed)
  • More robust React/Angular detection
  • More robust unit test detection
  • Scripted fields for ratio code metrics like todos per total LOC
  • Fix alphabetical tag ordering bug (maybe just skip alpha and beta versions?)
  • Index since the beginning of time
  • Collect additional metrics (# of classes in TS/JS, style rules in CSS, ...)
  • Collect amount of services/directives/controller for each file
  • Merge with information about code coverage / linting errors
  • Merge with information about build sizes

kibana_analyze's People

Contributors

flash1293 avatar

Watchers

 avatar

Forkers

lizozom

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.