<commit_before>package com.paritytrading.parity.match.perf;

import com.paritytrading.parity.match.Market;
import com.paritytrading.parity.match.MarketListener;
import com.paritytrading.parity.match.Side;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;

@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@BenchmarkMode(Mode.SampleTime)
public class MarketBenchmark {

    private Market market;

    private long sequence;

    @Setup(Level.Iteration)
    public void prepare() {
        MarketListener listener = new MarketListener() {
            public void match(long restingOrderId, long incomingOrderId, Side incomingSide, long price,
                    long executedQuantity, long remainingQuantity) {
            }
            public void add(long orderId, Side side, long price, long size) {
            }
            public void cancel(long orderId, long canceledQuantity, long remainingQuantity) {
            }
        };

        market = new Market(listener);

        sequence = 0;
    }

    @Benchmark
    public void testEnterOrder() {
        market.enter(sequence++, Side.BUY, 34090, 100);
    }

    @Benchmark
    public void testEnterAndDeleteOrder() {
        long id = sequence++;

        market.enter(id, Side.BUY, 34090, 100);
        market.cancel(id, 0);
    }
<commit_msg>Clean up test names in matching engine performance test<commit_after>package com.paritytrading.parity.match.perf;

import com.paritytrading.parity.match.Market;
import com.paritytrading.parity.match.MarketListener;
import com.paritytrading.parity.match.Side;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;

@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@BenchmarkMode(Mode.SampleTime)
public class MarketBenchmark {

    private Market market;

    private long sequence;

    @Setup(Level.Iteration)
    public void prepare() {
        MarketListener listener = new MarketListener() {
            public void match(long restingOrderId, long incomingOrderId, Side incomingSide, long price,
                    long executedQuantity, long remainingQuantity) {
            }
            public void add(long orderId, Side side, long price, long size) {
            }
            public void cancel(long orderId, long canceledQuantity, long remainingQuantity) {
            }
        };

        market = new Market(listener);

        sequence = 0;
    }

    @Benchmark
    public void enter() {
        market.enter(sequence++, Side.BUY, 34090, 100);
    }

    @Benchmark
    public void enterAndCancel() {
        long id = sequence++;

        market.enter(id, Side.BUY, 34090, 100);
        market.cancel(id, 0);
    }

{'fraction_non_alphanumeric': 0.09634949132256133, 'fraction_numerical': 0.010771992818671455, 'mean_word_length': 3.2050314465408807, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2375820', 'n_tokens_mistral': 1069, 'n_tokens_neox': 984, 'n_words': 216}