This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CaliperResultParser { | |
| public static void main(String[] args) { | |
| def slurper = new JsonSlurper() | |
| def json = slurper.parseText(new File(args[0]).getText()) | |
| json.each { | |
| println it.scenario.benchmarkSpec.methodName + ' = ' + it.measurements.collect { | |
| row -> row.value.magnitude / row.weight | |
| }.sum() / it.measurements.size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _____________________________________ | |
| < beavis.zen : echo This is test text > | |
| ------------------------------------- | |
| \ __------~~-, | |
| \ ,' , | |
| / \ | |
| / : | |
| | ' | |
| | | | |
| | | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Field field = Unsafe.class.getDeclaredField("theUnsafe"); | |
| field.setAccessible(true); | |
| Unsafe unsafe = (Unsafe) field.get(null); | |
| Integer test = 999; | |
| int strAddress = unsafe.getInt("", 8L); | |
| unsafe.putInt(test, 8L, strAddress); | |
| System.out.println(test.getClass()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sun.misc.Unsafe; | |
| import java.lang.reflect.Field; | |
| import java.util.concurrent.ForkJoinPool; | |
| /** | |
| * @author Jakub Kubrynski | |
| */ | |
| public class ReplaceCommonPool { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| option gchisto { | |
| column { | |
| header "^TT^" | |
| width 3 | |
| data sun.gc.policy.tenuringThreshold | |
| } | |
| column { | |
| header "A0^" | |
| width 8 | |
| scale K |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>io.codearte.perf</groupId> | |
| <artifactId>jmh-tests</artifactId> | |
| <version>1.0.0</version> | |
| <packaging>jar</packaging> | |
| <dependencies> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package springtutorial.scoringsystem.data.config; | |
| import org.hibernate.jpa.HibernatePersistenceProvider; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.data.jpa.repository.config.EnableJpaRepositories; | |
| import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase; | |
| import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; | |
| import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; | |
| import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.springframework.boot</groupId> | |
| <artifactId>spring-boot-maven-plugin</artifactId> | |
| </plugin> | |
| <plugin> | |
| <groupId>org.codehaus.gmavenplus</groupId> | |
| <artifactId>gmavenplus-plugin</artifactId> | |
| <version>1.5</version> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <plugin> | |
| <groupId>org.springframework.cloud</groupId> | |
| <artifactId>spring-cloud-contract-maven-plugin</artifactId> | |
| <version>1.1.0.M1</version> | |
| <extensions>true</extensions> | |
| <configuration> | |
| <basePackageForTests>com.test.weather.web</basePackageForTests> | |
| <baseClassForTests>com.test.weather.web.AbstractContractTest</baseClassForTests> | |
| <testFramework>JUNIT</testFramework> | |
| </configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.hibernate.boot.model.relational.Sequence; | |
| import org.hibernate.tool.schema.internal.DefaultSchemaFilter; | |
| import org.hibernate.tool.schema.spi.SchemaFilter; | |
| import org.hibernate.tool.schema.spi.SchemaFilterProvider; | |
| public class NoSequenceFilterProvider implements SchemaFilterProvider { | |
| @Override | |
| public SchemaFilter getCreateFilter() { | |
| return noSequenceFilter(); |