Home / Class/ NettyEnvironment Class — netty Architecture

NettyEnvironment Class — netty Architecture

Architecture documentation for the NettyEnvironment class in IntObjectHashMapBenchmark.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  60bc901b_6fc8_1533_0c33_62ee4332ff8f["NettyEnvironment"]
  6db8a76f_31e4_5c67_7f35_99ab8043f7cc["IntObjectHashMapBenchmark.java"]
  60bc901b_6fc8_1533_0c33_62ee4332ff8f -->|defined in| 6db8a76f_31e4_5c67_7f35_99ab8043f7cc
  5587075b_d7ef_76fe_3114_7c4c4d86f100["NettyEnvironment()"]
  60bc901b_6fc8_1533_0c33_62ee4332ff8f -->|method| 5587075b_d7ef_76fe_3114_7c4c4d86f100
  ee9d8cc8_149a_4702_24eb_45c69d4a9812["put()"]
  60bc901b_6fc8_1533_0c33_62ee4332ff8f -->|method| ee9d8cc8_149a_4702_24eb_45c69d4a9812
  35b0e26e_6b0b_7a1a_2e36_c90f06282e0f["lookup()"]
  60bc901b_6fc8_1533_0c33_62ee4332ff8f -->|method| 35b0e26e_6b0b_7a1a_2e36_c90f06282e0f
  86ab7f1d_7a54_ef1f_e1af_0dc073ee0a0c["remove()"]
  60bc901b_6fc8_1533_0c33_62ee4332ff8f -->|method| 86ab7f1d_7a54_ef1f_e1af_0dc073ee0a0c

Relationship Graph

Source Code

microbench/src/main/java/io/netty/microbenchmark/common/IntObjectHashMapBenchmark.java lines 159–191

    private class NettyEnvironment extends Environment {
        private final IntObjectHashMap<Long> map = new IntObjectHashMap<Long>();

        NettyEnvironment() {
            for (int key : keys) {
                map.put(key, VALUE);
            }
        }

        @Override
        void put(Blackhole bh) {
            IntObjectHashMap<Long> map = new IntObjectHashMap<Long>();
            for (int key : keys) {
                bh.consume(map.put(key, VALUE));
            }
        }

        @Override
        void lookup(Blackhole bh) {
            for (int key : keys) {
                bh.consume(map.get(key));
            }
        }

        @Override
        void remove(Blackhole bh) {
            IntObjectHashMap<Long> copy = new IntObjectHashMap<Long>();
            copy.putAll(map);
            for (int key : keys) {
                bh.consume(copy.remove(key));
            }
        }
    }

Frequently Asked Questions

What is the NettyEnvironment class?
NettyEnvironment is a class in the netty codebase, defined in microbench/src/main/java/io/netty/microbenchmark/common/IntObjectHashMapBenchmark.java.
Where is NettyEnvironment defined?
NettyEnvironment is defined in microbench/src/main/java/io/netty/microbenchmark/common/IntObjectHashMapBenchmark.java at line 159.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free