Flamegraph tool for node.js

Overview

infernode

Current version: 1.0.0

Flamegraph tool for node.js

Usage

Coming soon...

Interface

Overview

ui overview

General Page Layout

generic page layout

Page Wireframes

history page capture page manage page help page

Architecture

Backend Tech Stack

  • TypeScript
  • Node.js
  • Express.js
  • SQLite3
  • Jest

Frontend Tech Stack

  • TypeScript
  • React
  • React-Router
  • React-Bootstrap

High Level Diagram

infernode architecture diagram

Developing

  1. Clone this repository
  2. npm install in the repo directory
  3. npm run dev to run the server with on-save recompile/reload

Additional project scripts

All scripts are accessible via npm run <scriptname>.

  • clean: Remove all contents of the ./dist/ directory
  • copy-assets: Copy static assets from ./src/ to ./dist/
  • lint: Run linter (ESLint) against the relevant client and server source code
  • prebuild: Sequentially runs lint, clean, and copy-assets prior to all builds
  • tsc: Performs TypeScript transpilation for the server project
  • build: Performs npm run prebuild, npm run tsc, and npm run webpack sequentially, will halt if any prebuild steps have non-zero exit codes
  • test: Performs a fresh build and then executes all test suites
  • start: Starts the node server in production mode, access via http://localhost:3000
  • dev: Starts the node and webpack-dev-server servers in development mode, both dynamically recompiling/bundling/restarting on source code changes, access via http://localhost:8080

Express.js Global Error Handler

  • Invoked via next( errObject: InfernodeError ).
  • Takes an InfernodeError type object with the following mandatory properties:
    • message: string: A technical error message not necessarily intended for end users
  • The InfernodeError object can optionally include:
    • userMessage: string: A non-technical error message intended for (public) end users or API consumers
    • httpStatus: number: A more specific HTTP status code to use for the response
    • controller: string: The Express middleware controller/function/method/operation that caused the error
  • Logs the entire error object + the request method and path to the server's console.
  • The response status will be set to 500 by default if an errObject.httpStatus code is not provided.
  • In development mode, entire error object, request method, and request path will be sent in the HTTP response body as JSON.
  • In production mode, only the errObject.userMessage will be sent in the HTTP response body as JSON.

Contributing

Commit Messages

For working branch commits a single line message is sufficient

For PR commits please add a longer description of the changes

Please author single line commit messages and PR commit titles to:

  • Start with capital letter
  • Have no trailing punctuation
  • Use imperative and present tense
  • Describe the outcome, not the process
  • Be less than 50 characters in length

Pull Requests

  • Development should be performed on branches from dev and PR'd back to dev once complete,
  • Releases will be performed by PRing to main.
  • Pull Requests to dev and main are blocked on passing GHA checks. In order to ensure your PR will pass checks, make sure that:
    • All new dependencies have been included in package.json/package-lock.json
    • All tests are passing locally via npm test
    • All ESLint checks pass locally via npm run lint
    • A new build is successful locally via npm run build
    • The app is functional in production mode via npm run build && npm start and browsing to http://localhost:3000

Please consider the following when filing pull requests:

  • Update working branch from dev
  • Test the above GHA check criteria locally
  • PR title should take the form of a commit message title
  • Body of PR should take the form of a full commit message body
  • Once approved, the PR author is responsible for squash merging into the destination branch
  • Branches should be deleted after merge

Branch Names

  • Use a new branch for each new feature and eventual PR
  • Use the format of "type/descriptive-outcome"
  • Types include:
    • bugfix
    • feature
    • docs
    • testing
    • refactor
  • The descriptive-outcome should describe what will be achieved by merging the branch
Comments
  • feat(scss): override bootstrap color them by refactoring scss handling

    feat(scss): override bootstrap color them by refactoring scss handling

    Refactor scss handling out of webpack, instead use sass-dart to compile. Update package.json with new commands, refactor old commands ot mak to make usage more c more clear. Fix linting issues.

    re: https://github.com/oslabs-beta/infernode/issues/180

    feature 
    opened by seadubs 3
  • Capture form styling and refactoring

    Capture form styling and refactoring

    Refactored form sections into separate components Added tabbed interface for basic vs advanced captures Unified button / header styling across pages Unified sidebar width across pages

    image

    feature refactor released 
    opened by seadubs 3
  • Bump loader-utils from 2.0.2 to 2.0.3

    Bump loader-utils from 2.0.2 to 2.0.3

    Bumps loader-utils from 2.0.2 to 2.0.3.

    Release notes

    Sourced from loader-utils's releases.

    v2.0.3

    2.0.3 (2022-10-20)

    Bug Fixes

    • security: prototype pollution exploit (#217) (a93cf6f)
    Changelog

    Sourced from loader-utils's changelog.

    2.0.3 (2022-10-20)

    Bug Fixes

    • security: prototype pollution exploit (#217) (a93cf6f)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 2
  • fix(index.ts): modified default server port in index.ts and webpack.dev.js

    fix(index.ts): modified default server port in index.ts and webpack.dev.js

    I updated the port number in index.ts to avoid conflicts with the use of port 3000. I also changed the webpack proxy target to match the change.

    'fix #207'

    bugfix 
    opened by cdschexnide 2
  • feat(scss): override bootstrap color them by refactoring scss handling

    feat(scss): override bootstrap color them by refactoring scss handling

    Refactor scss handling out of webpack, instead use sass-dart to compile. Update package.json with new commands, refactor old commands ot mak to make usage more c more clear. Fix linting issues.

    closes: https://github.com/oslabs-beta/infernode/issues/180

    feature refactor released 
    opened by seadubs 2
  • Basic linux perf capture working

    Basic linux perf capture working

    Change appController to not use a subshell when starting processes to ensure we get the PID of the actual node app. Add perfController, similar to dtraceController Update routers

    feature released 
    opened by seadubs 2
  • Add and use Node.JS logging library

    Add and use Node.JS logging library

    Added pino for Node.JS logging and pino-http for Express.JS request logging.

    In development mode logs are output to stdout (the console), otherwise (e.g. in production usage) logs are output to ./infernode.log.

    pino-http is now in use for all Express.JS requests. Non-error (2xx/3xx status codes) requests are logged at debug level and only output in development mode.

    console.log has been partially swapped out for a pino logger object/method in low-churn areas of the codebase. Functions under active development can make the change when appropriate.

    To use pino's logging functionality, simply import the object ( import logger from './utils/logging'; ) and then use one of the following methods depending on what is being logged. Time-stamping and printing the log level are automatically handled by pino.

    logger.trace('This is the lowest level of logging, and wont appear unless pino is configured to show trace logs');
    logger.debug('This level is appropriate for messages that should be shown during development but hidden in production');
    logger.info('This level is appropriate for informational messages, such as what port a server is listening on');
    logger.warn('This level is appropriate for non-critical errors (e.g. execution should continue, but there is a problem');
    logger.error('This level is appropriate for critical errors (e.g. the application will or should halt execution');
    
    feature released 
    opened by seadubs 2
  • Feature/diff controller

    Feature/diff controller

    Added back-end logic and functionality for the following: icicle charts can now be created differential flamegraphs can now be created if the user chooses two existing flamegraphs to compare generating icicle charts with either a dtrace or perf upload

    still working on adding the standalone dtrace capture process, and node kill process.

    The following endpoints are either setup or under construction:

    /api/app/start --> start node app /api/app/stop --> stop node app

    these dtrace captures will run with time given by user, having a separate stop button is a stretch stretch feature /api/dtrace/icicle --> runs dtrace and produces a icicle chart /api/dtrace/flamegraph --> runs dtrace and produces a flamegraph

    /api/dtrace/run/icicle --> starts node app and runs dtrace all at once, generates icicle chart /api/dtrace/run/flamegraph --> starts node app and runs dtrace all at once, generates flamegraph

    /api/captures/icicle --> generate icicle chart with given perf capture /api/captures/flamegraph --> generate flamegraph with given perf capture

    /api/diff --> generate a differential flamegraph from two existing flamegraphs chosen by the client

    released 
    opened by 8000meters 2
  • flamegraph controller: restructure error handling, add ability to read error codes from node child process commands

    flamegraph controller: restructure error handling, add ability to read error codes from node child process commands

    Right now, if something goes wrong when running the exec child process then we don't have a way to retrieve the error code from the node process. Adding the ability to retrieve and check this code will help us identify issues going forward. It will also be valuable when we start sanitizing the user uploaded files.

    bugfix feature 
    opened by 8000meters 2
  • Enforce linting on PR, update readme with dev details

    Enforce linting on PR, update readme with dev details

    Enforces ESLint passing for both client and server projects when PRing to dev or main.

    Extends documentation on dev process including what GHA checks are performed, what npm run scripts are available, and how to use the Express.js global error handler.

    Closes #34, closes #16.

    docs testing 
    opened by seadubs 2
  • fix(node.js.yml): Remove workflow-2 trigger from node.js GHA

    fix(node.js.yml): Remove workflow-2 trigger from node.js GHA

    Looks like this fails if a PR author does not have actions to the GHA secrets. Probably need to move this to a separate workflow that only triggers when a team member does the merge to dev/main, rather than just on PR filing.

    ci/cd 
    opened by seadubs 1
  • build(deps): bump loader-utils from 2.0.3 to 2.0.4

    build(deps): bump loader-utils from 2.0.3 to 2.0.4

    Bumps loader-utils from 2.0.3 to 2.0.4.

    Release notes

    Sourced from loader-utils's releases.

    v2.0.4

    2.0.4 (2022-11-11)

    Bug Fixes

    Changelog

    Sourced from loader-utils's changelog.

    2.0.4 (2022-11-11)

    Bug Fixes

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • filtering graphs by type on differential page

    filtering graphs by type on differential page

    Currently there is a mechanism in place to filter out the graphs by type so that the diff page only shows flamegraphs and ice graphs to compare. However it currently does not work.

    bugfix good first issue refactor 
    opened by 8000meters 0
  • Move differential page state to redux so user can select graphs to compare that are on different tabs

    Move differential page state to redux so user can select graphs to compare that are on different tabs

    when selecting graphs to compare on the differential page, if you have more than one page of flamegraphs, you can't compare graphs from different pages because the state that holds your selection is held locally instead of in redux

    bugfix good first issue 
    opened by 8000meters 0
  • Include example tasks in npm pkg, test them, and add docs for usage

    Include example tasks in npm pkg, test them, and add docs for usage

    Currently the example apps are not included in the final npm package distributable, that should be fixed. We should also test them to make sure they work without installing additional dependencies (e.g. eliminating the express dependency from example-server.js). And finally we should add documentation and/or ui elements that allow easy usage of the example apps with infernode.

    bugfix docs refactor 
    opened by seadubs 0
  • Unify naming/grammar across app and documentation

    Unify naming/grammar across app and documentation

    infernode vs infernode vs INFERNOde flame graph vs flamegraph / ice graph vs icegraph (BGregg uses both interchangeably) Node.JS vs Node.js vs Nodejs Express.JS vs Express.js vs Express

    docs good first issue 
    opened by seadubs 0
Releases(v1.1.0)
  • v1.1.0(Sep 9, 2022)

  • v1.0.0(Aug 26, 2022)

Owner
OSLabs Beta
OSLabs Beta
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and configure Typescript on it.

CTSP- Create TS Project A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and conf

Jean Rodríguez 7 Sep 13, 2022
Node 18's node:test, as a node module

node-core-test This is a user-land port of node:test, the experimental test runner introduced in Node.js 18. This module makes it available in Node.js

Julian Gruber 62 Dec 15, 2022
Strcmp-node - A cli string comparison tool, because apparently one doesn't exist.

strcmp-node I couldn't find a string comparison command, so i made my own. its probably the ugliest thing since godzilla with makeup on, but it works.

Gingka/Ginger Pepper 1 Jan 1, 2022
A Node.JS tool to automatically install or update your FiveM server artifacts.

ItsANoBrainer FiveM Artifact Updater FiveM Artifact Updater is an application created with Node.JS to easily and quickly install/update your artifacts

null 23 Dec 8, 2022
Tool to automate making Reddit accounts, written in Node.

redgen Tool to automate making Reddit accounts, written in Node. installation & configuration NOTE: This program requires that you have a 2Captcha acc

aria 3 Sep 1, 2022
A TOML parsing tool written in Rust for Node.js

@daydog/toml A TOML parsing tool written in Rust for Node.js Installation @daydog/toml is available via npm. npm install @daydog/toml Usage parse You

null 5 Jul 20, 2022
Node WebStation is a powerful tool designed for developers allowing them to create advanced web sockets for any use all without having the requirement to code.

Node WebStation Node WebStation is a powerful tool designed for developers to use to create an advanced WebStation for any use all without not having

null 2 Jun 4, 2022
A simple node tool.

URLignore 中文文档 A simple node tool that supports removing duplicate configuration nodes, adding countries and add custom content automatically. Support

WuMX 7 Jul 23, 2022
👁‍🗨 cleye — The intuitive CLI development tool for Node.js

cleye The intuitive command-line interface (CLI) development tool. Features Minimal API surface Powerful flag parsing Strongly typed parameters and fl

hiroki osame 235 Jan 6, 2023
Node-cli-starter - Basic starter kit for building Node CLI applications with TypeScript.

node-cli-starter Minimal starter kit for building Node CLI applications with TypeScript. Getting Started To get started clone repo locally and run npm

Cory Rylan 7 May 17, 2022
Apilytics for Node.js - Easy API analytics for Node backends

apilytics-node Apilytics is a service that lets you analyze operational, performance and security metrics from your APIs without infrastructure-level

Apilytics 9 Sep 2, 2022
This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Eduardo Dantas 7 Jul 19, 2022
Inter Process Communication Module for node supporting Unix sockets, TCP, TLS, and UDP. Giving lightning speed on Linux, Mac, and Windows. Neural Networking in Node.JS

Inter Process Communication Module for node supporting Unix sockets, TCP, TLS, and UDP. Giving lightning speed on Linux, Mac, and Windows. Neural Networking in Node.JS

Node IPC 43 Dec 9, 2022
Node js package makes creating node jd dependincies files like Controllers,Entities and Repositories easier by executing a few instructions

Nodejs Studio Node js package makes creating node js project dependincies files like Controllers,Entities and Repositories easier by executing a few i

Syrian Open Source 9 Oct 12, 2022
Spin node create spin api for node

Links Contract api JS api @spinfi/core @spinfi/node @spinfi/node Spin node create spin api for node How to install yarn add @spinfi/node How to init i

Spin 6 Oct 18, 2022
A tool to check for response status codes with ease

About Archer Archer is an cross-platform tool developed using Nodejs which focuses on the reconnaissance phase of a penetration test. Got a bunch of l

Umair 14 Oct 19, 2022