HashShmash

An aspect and reporting tool to track Hash collection allocations

Лицензия

Лицензия

Группа

Группа

com.mebigfatguy.hashshmash
Идентификатор

Идентификатор

hashshmash
Последняя версия

Последняя версия

0.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

HashShmash
An aspect and reporting tool to track Hash collection allocations
Система контроля версий

Система контроля версий

https://github.com/mebigfatguy/hashshmash

Скачать hashshmash

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.mebigfatguy.hashshmash/hashshmash/ -->
<dependency>
    <groupId>com.mebigfatguy.hashshmash</groupId>
    <artifactId>hashshmash</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.mebigfatguy.hashshmash/hashshmash/
implementation 'com.mebigfatguy.hashshmash:hashshmash:0.2.0'
// https://jarcasting.com/artifacts/com.mebigfatguy.hashshmash/hashshmash/
implementation ("com.mebigfatguy.hashshmash:hashshmash:0.2.0")
'com.mebigfatguy.hashshmash:hashshmash:jar:0.2.0'
<dependency org="com.mebigfatguy.hashshmash" name="hashshmash" rev="0.2.0">
  <artifact name="hashshmash" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.mebigfatguy.hashshmash', module='hashshmash', version='0.2.0')
)
libraryDependencies += "com.mebigfatguy.hashshmash" % "hashshmash" % "0.2.0"
[com.mebigfatguy.hashshmash/hashshmash "0.2.0"]

Зависимости

provided (5)

Идентификатор библиотеки Тип Версия
org.aspectj : aspectjtools jar 1.7.2
org.aspectj : aspectjrt jar 1.7.2
xalan : xalan jar 2.7.1
xalan : serializer jar 2.7.1
xml-apis : xml-apis jar 1.3.04

Модули Проекта

Данный проект не имеет модулей.

An aspectj library for evaluating the various metrics about hashed collections at runtime, such as:

  • Allocations of zero sized collections
  • Overly sized collections for their contents
  • poorly dispersed items due to poor hashCodes
  • excessive allocations of collections

To use, apply the aspect to your code with an ant task such as this:

    <target name="aspects" xmlns:aspectj="antlib:org.aspectj">  
        <aspectj:iajc outJar="${build.dir}/${your_jar_name}_aj.jar" showWeaveInfo="true">  
            <aspectpath>  
                <pathelement location="${lib.dir}/hashshmash-0.2.0.jar"/>
            </aspectpath>  
            <inpath>  
                <pathelement location="${build.dir}/${your_jar_name}.jar"/>  
            </inpath>  
            <classpath>  
                <pathelement location="${lib.dir}/aspectjrt.jar"/>  
                <path refid="your.classpath"/>  
            </classpath>  
       </aspectj:iajc>  
    </target>

When compiling the aspectjtools.jar should be in ant/lib

Then delete your original jar ${build.dir}/${your_jar_name}.jar and just use ${build.dir}/${your_jar_name}_aj.jar You will need to include aspectj.jar and hashshmash.jar in your classpath when running your application.

The aspect will generate a file in ${user.home}/.hashshmash with allocation information in the form

Type \t AllocationTime \t AllocationSite \t CollectionSize \t NumberOfBuckets \t UsedBuckets

You will need aspectjtools.jar to apply the aspect to your code, as well as aspectjrt.jar to run it.

Once you have collected a statistics file by running with aspects, you can generate an html report by running

java -classpath hashsmhash.jar:aspectjrt.jar:xml-apis.jar:xalan.jar:serializer.jar com.mebigfatguy.hashshmash.Report

or if using ant, there is an ant task

    <target name="report" xmlns:report="com.mebigfatguy.hashsmash.report">
        <report:report/>
    </target>

HashShmash is available on maven.org

groupId:    com.mebigfatguy.hashshmash
artifactid: hashshmash
version:    0.2.0

Версии библиотеки

Версия
0.2.0