Skip to content

Instantly share code, notes, and snippets.

public final class PerClassStatistics
{
private final String className;
private final int nrRules;
private final int nrCalls;
public PerClassStatistics(final String className, final int nrRules,
final int nrCalls)
{
this.className = className;
public final class PerClassStatisticsMapper
implements RecordMapper<Record, PerClassStatistics>
{
@Override
public PerClassStatistics map(final Record record)
{
//noinspection AutoUnboxing
return new PerClassStatistics(
record.getValue(Tables.MATCHERS.CLASS_NAME),
record.getValue("nrRules", Integer.class),
@Nonnull
@Override
public List<PerClassStatistics> getRulesByClass()
throws GrappaDebuggerException
{
waitForMatchers();
return jooq.select(MATCHERS.CLASS_NAME, DSL.count().as("nrCalls"),
DSL.countDistinct(NODES.MATCHER_ID).as("nrRules"))
.from(MATCHERS, NODES)
package com.github.fge.lambdas.v2;
public abstract class Chain<N, T extends N, C extends Chain<N, T, C>>
{
protected final T throwing;
protected Chain(final T throwing)
{
this.throwing = throwing;
}
package com.github.fge.lambdas.v2;
public abstract class Chainer<N, T extends N, C extends Chainer<N, T, C>>
{
protected final T throwing;
protected Chainer(final T throwing)
{
this.throwing = throwing;
}
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
/*
* Copyright (c) 2015, Francis Galiegue (fgaliegue@gmail.com)
*
* This software is dual-licensed under:
*
* - the Lesser General Public License (LGPL) version 3.0 or, at your option, any
* later version;
* - the Apache Software License (ASL) version 2.0.
*
* The text of both licenses is available under the src/resources/ directory of
/*
* Copyright (c) 2015, Francis Galiegue (fgaliegue@gmail.com)
*
* This software is dual-licensed under:
*
* - the Lesser General Public License (LGPL) version 3.0 or, at your option, any
* later version;
* - the Apache Software License (ASL) version 2.0.
*
* The text of both licenses is available under the src/resources/ directory of
/*
* Copyright (c) 2015, Francis Galiegue (fgaliegue@gmail.com)
*
* This software is dual-licensed under:
*
* - the Lesser General Public License (LGPL) version 3.0 or, at your option, any
* later version;
* - the Apache Software License (ASL) version 2.0.
*
* The text of both licenses is available under the src/resources/ directory of