xmlBlaster 2.2.0 API

org.xmlBlaster.test.classtest.queue
Class EntrySize

java.lang.Object
  extended by org.xmlBlaster.test.classtest.queue.EntrySize

public class EntrySize
extends java.lang.Object

Helper to find out size of Queue entries. Use it together with a profiling tool.

See Also:
MsgQueueUpdateEntry, MsgQueueHistoryEntry, MsgUnitWrapper

Field Summary
protected  ServerScope glob
           
private static java.util.logging.Logger log
           
 
Constructor Summary
EntrySize(ServerScope glob)
           
 
Method Summary
 void connectEntry()
          Object creation RAM of MsgQueueConnectEntry without payload (the payload here is additional 456 bytes):
 void historyEntry()
          Object creation RAM without payload:
static void main(java.lang.String[] args)
           java org.xmlBlaster.test.classtest.queue.EntrySize
 void msgUnitWrapperEntry()
          Object creation RAM without payload (the payload here is additional 78 bytes):
 void publishEntry()
          Object creation RAM without payload (the payload here is additional 23 bytes):
 void subscribeEntry()
          Object creation RAM without payload (the payload here is additional 23 bytes):
 void updateEntry()
          Sun JDK 1.4.1 b19 / Linux 2.4.19: 179 bytes/entry IBM JDK 1.3.1 / Linux 2.4.19 : 172 bytes/entry Created objects: - Timestamp - MsgQueueUpdateEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

glob

protected ServerScope glob

log

private static java.util.logging.Logger log
Constructor Detail

EntrySize

public EntrySize(ServerScope glob)
Method Detail

updateEntry

public void updateEntry()
Sun JDK 1.4.1 b19 / Linux 2.4.19: 179 bytes/entry IBM JDK 1.3.1 / Linux 2.4.19 : 172 bytes/entry Created objects: - Timestamp - MsgQueueUpdateEntry


historyEntry

public void historyEntry()
Object creation RAM without payload:
 Sun JDK 1.4.1 b19 / Linux 2.4.19: 176 bytes/entry
 IBM JDK 1.3.1 / Linux 2.4.19    : 164 bytes/entry
 Created objects:
 - Timestamp
 - MsgQueueUpdateEntry
 


msgUnitWrapperEntry

public void msgUnitWrapperEntry()
Object creation RAM without payload (the payload here is additional 78 bytes):
 Sun JDK 1.4.1 b19 / Linux 2.4.19: 3214 bytes/entry
 IBM JDK 1.3.1 / Linux 2.4.19    : 2920 bytes/entry

 Estimated calculation of used memory by one MsgUnitWrapper instance
 = Object memory + payload(=msgUnit.size())

 Where following objects need to be created:
 5 PropBoolean
 1 PropLong
 1 RcvTimestamp
 1 MsgQosData
 1 MsgKeyData
 1 MsgUnit
 1 MsgUnitWrapper
 


publishEntry

public void publishEntry()
Object creation RAM without payload (the payload here is additional 23 bytes):
 Sun JDK 1.4.1 b19 / Linux 2.4.19: 659 bytes/entry
 IBM JDK 1.3.1 / Linux 2.4.19    : 627 bytes/entry

 Estimated calculation of used memory by one MsgUnitWrapper instance
 = Object memory + payload(=msgUnit.size() here is 23 bytes)

 Where following objects need to be created:
 6 PropBoolean
 1 PropLong
 1 Timestamp
 1 MsgQosData
 1 MsgKeyData
 1 MsgUnit
 1 MsgQueuePublishEntry

 Performance: Most performance is consumed here for SAX parsing of key and qos
 


subscribeEntry

public void subscribeEntry()
Object creation RAM without payload (the payload here is additional 23 bytes):
 Sun JDK 1.4.1 b19 / Linux 2.4.19: 567 bytes/entry

 Where following objects need to be created:
 7 PropBoolean
 1 Timestamp
 1 QueryQosData
 1 SubscribeQos
 1 QueryKeyData
 1 SubscribeKey
 1 HistoryQos
 1 MsgQueueSubscribeEntry
 


connectEntry

public void connectEntry()
Object creation RAM of MsgQueueConnectEntry without payload (the payload here is additional 456 bytes):
 Sun JDK 1.4.1 b19 / Linux 2.4.19: 2400 bytes/entry

 Almost everything is consumed by the expensive ConnectQos object creation.
 6 PropBoolean
 5 PropLong
 4 PropString
 1 NodeId
 1 SessionName
 1 SecurityQos
 1 ConnectQos
 1 SessionQos
 1 MsgQueueConnectEntry
 1 QueueProperty
 1 PropInt
 1 ConnectQosData
 1 Timestamp

 The toXml() size is 456 bytes
 


main

public static void main(java.lang.String[] args)
  java org.xmlBlaster.test.classtest.queue.EntrySize
 


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.