public class StringConverterBenchmark
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
StringConverterBenchmark.ConcurrentHashMapStringConverter
Cache based on a ConcurrentMap.
|
static class |
StringConverterBenchmark.InternStringConverter
Cache based on String.intern().
|
static class |
StringConverterBenchmark.NonCachingStringConverter
No memory usage for cache, but any string is a separate instance after deserialization.
|
class |
StringConverterBenchmark.SynchronizedWeakCacheStringConverter
Cache based on a synchronized WeakHashMap with weak keys.
|
Constructor and Description |
---|
StringConverterBenchmark() |
Modifier and Type | Method and Description |
---|---|
void |
init()
Initialize the XML string to deserialize.
|
void |
intern()
Any string is stored also in the String's internal memory space.
|
void |
limitedConcurrentMap()
Strings of 38 characters or less are cached in a concurrent map.
|
void |
limitedSynchronizedWeakCache()
Strings of 38 characters or less are cached in a weak entry.
|
void |
nonCaching()
No cache for deserialized strings, each string is an own instance.
|
void |
setUp(BenchmarkParams params)
Setup the data to deserialize.
|
void |
unlimitedConcurrentMap()
Any string is cached in a concurrent map.
|
void |
unlimitedSynchronizedWeakCache()
Any string is cached in a weak entry.
|
public void init()
public void setUp(BenchmarkParams params)
params
- the parameters of the benchmarkpublic void nonCaching()
public void intern()
public void unlimitedSynchronizedWeakCache()
public void limitedSynchronizedWeakCache()
public void unlimitedConcurrentMap()
public void limitedConcurrentMap()
Copyright © 2004–2024 XStream. All rights reserved.