Coder Social home page Coder Social logo

pepper's Introduction

pepper

Various Java utilities

Build Status Coverage Status Maven Central Quality Gate Technical debt ratio javadoc.io Issues Forks Stars MIT License

pepper-java

Various utilities helping operating in Java on a daily basis.

Standard helpers

GCInspector is drop-in class providing standard logs related to GC activity

  @Bean
	public IPepperThreadDumper pepperThreadDumper() {
		return new PepperThreadDump(ManagementFactory.getThreadMXBean());
	}

	@Bean
	public GCInspector gcInspector(IpepperThreadDumper pepperThreadDumper) {
		return new GCInspector(pepperThreadDumper);
	}

PepperLogHelper helps publishing relevant logs regarding memory and timings

  Assert.assertEquals("0.09%", pepperLogHelper.getNicePercentage(123, 123456).toString());
  
  
  Assert.assertEquals("9sec 600ms", pepperLogHelper.getNiceTime(9600).toString());
  Assert.assertEquals("2min 11sec", pepperLogHelper.getNiceTime(131, TimeUnit.SECONDS).toString());
  
  
  Assert.assertEquals("789B", pepperLogHelper.getNiceMemory(789L).toString());
  Assert.assertEquals("607KB", pepperLogHelper.getNiceMemory(789L * 789).toString());
  Assert.assertEquals("468MB", pepperLogHelper.getNiceMemory(789L * 789 * 789).toString());
  Assert.assertEquals("360GB", pepperLogHelper.getNiceMemory(789L * 789 * 789 * 789).toString());
  Assert.assertEquals("278TB", pepperLogHelper.getNiceMemory(789L * 789 * 789 * 789 * 789).toString());
  Assert.assertEquals("214PB", pepperLogHelper.getNiceMemory(789L * 789 * 789 * 789 * 789 * 789).toString());

Fancy helpers

ObjectInputHandlingInputStream enables transmitting a raw InputStream through an ObjectInput

CartesianProductHelper helps computing covering cartesian products over sets defined by Collections and Maps.

PepperProcessHelper enables tracking the memory consumption of a process (would it be current JVM, a forked Process or any other process).

  PepperProcessHelper.getProcessResidentMemory(processPID)

Pepper-MAT

A fork from Eclipse MAT for HeapDump analysis. It improves original MAT by lowering the heap required to prepare MAT index files, while keeping the produced indexes compatible with the original MAT.

Original work: https://git.eclipse.org/c/mat/org.eclipse.mat.git

pepper's People

Contributors

blacelle avatar renovate-bot 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.