Hi Aaron,

I can answer some of your questions.

The pMap serializes itself as a StringListCodec, and what you're seeing is the StringListCodec encoded representation of the key-value pairs in the pMap. You can read the javadocs for StringListCodec to learn about the representation, but the idea is support the sending of a list of strings without requiring "special" characters as delimiters (that way, any character can appear as data without being escaped). The way this is accomplished is to start with a four digit 'header' that says how many strings are in the list, followed by pairs of five digit integers indicating the length of the following string, followed by the string itself.

So, for example:

#>
pMap=000800009className0000000012numOfMethods00001900004size00004196400015n
umOfStatements0000220

This can be read as:
 0008 (there are 8 strings encoded in this StringListCodec)
 00009 (The next nine characters are the string)
 className  (the nine character string)
 00000 (The next zero characters are the string, i.e. the empty string)
 00012 (the next 12 characters are the string)
 numOfMethods (the 12 character string)
 etc.

Once on the server side, this string can be passed to the constructor for a SensorDataPropertyMap which creates a map containing [("classname", ""), ("numOfMethods", "19"), ...].

There's no easy way for the log file to provide a 'nicer' representation for pMaps, because what the log file reflects is what was passed to it as a command, and sensors that use the pMap have to send its encoded representation to the sensorshell (because, of course, the sensorshell only accepts strings; it can't accept Java collection objects like Maps and know what to do with them.)

Hopefully that answers your question about what the pMap representation is. As far as I know, there's no remaining work to be done on pMap; it's just a question of sensor developers starting to use it. I will let Hongbing respond as to why he is collecting the specific information he's collecting. :-)

Cheers,
Philip


--On Monday, October 3, 2005 9:10 PM -1000 Aaron Kagawa <[EMAIL PROTECTED]> wrote:

Hey Hongbing,

I just got off the phone with Mike and it seems that there is still some
work to do on pMap. Anyway, here is some Activity pMap data that seems to
be bogus.  Well, I guess I don't totally understand the specifics of
pMap, so as an External User: why Activity data has size information,
className always equals 12, why numOfStatmements has less digits than the
rest of the properties, etc.  Furthermore, it seems that these digits are
encoded (numOfMethods00001900004) some how, but I'm wondering if it makes
sense to print the decoded values to allow the user to understand what
the values are.

thanks, aaron

#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/bcml/Bcml
#> Sensor.java,
#> pMap=000800009className0000000012numOfMethods00001900004size00004196400
#> 015numOfStatements0000220]
Activity add OK (11 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/bcml/inst
#> aller/BCMLSensorInstaller.java,
#> pMap=000800009className0000000012numOfMethods00001600004size00004196400
#> 015numOfStatements0000214]
Activity add OK (12 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/bcml/inst
#> aller/TestBCMLSensorInstaller.java,
#> pMap=001200009className0000000012numOfMethods00001500019numOfTestAssert
#> ions00001100004size00004196400015numOfStatements00001700016numOfTestMet
#> hods000014]
Activity add OK (13 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/build/Bui
#> ldSensorAntListener.java,
#> pMap=000800009className0000000012numOfMethods000021200004size0000419640
#> 0015numOfStatements0000228]
Activity add OK (14 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/build/Bui
#> ldSensorInstallationAntTask.java,
#> pMap=000800009className0000000012numOfMethods00001400004size00004196400
#> 015numOfStatements000016]
Activity add OK (15 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/build/ins
#> taller/BuildSensorInstaller.java,
#> pMap=000800009className0000000012numOfMethods00001600004size00004196400
#> 015numOfStatements0000214]
Activity add OK (16 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/build/ins
#> taller/TestBuildSensorInstaller.java,
#> pMap=001200009className0000000012numOfMethods00001500019numOfTestAssert
#> ions00001100004size00004196400015numOfStatements00001700016numOfTestMet
#> hods000014]
Activity add OK (17 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/cccc/CCCC
#> Sensor.java,
#> pMap=000800009className0000000012numOfMethods000021000004size0000419640
#> 0015numOfStatements0000221]
Activity add OK (18 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/cccc/inst
#> aller/CCCCSensorInstaller.java,
#> pMap=000800009className0000000012numOfMethods00001600004size00004196400
#> 015numOfStatements0000214]
Activity add OK (19 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/cccc/inst
#> aller/TestCCCCSensorInstaller.java,
#> pMap=001200009className0000000012numOfMethods00001500019numOfTestAssert
#> ions00001100004size00004196400015numOfStatements00001700016numOfTestMet
#> hods000014]
Activity add OK (20 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/jblanket/
#> JBlanketSensor.java,
#> pMap=000800009className0000000012numOfMethods00001900004size00004196400
#> 015numOfStatements0000221]
Activity add OK (21 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/jblanket/
#> installer/JblanketSensorInstaller.java,
#> pMap=000800009className0000000012numOfMethods00001600004size00004196400
#> 015numOfStatements0000214]
Activity add OK (22 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/jira/Jira
#> IssueExtractorSensor.java,
#> pMap=000800009className0000000012numOfMethods000021400004size0000419640
#> 0015numOfStatements0000238]
Activity add OK (23 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/junit/JUn
#> itSensor.java,
#> pMap=000800009className0000000012numOfMethods00001900004size00004196400
#> 015numOfStatements0000225]
Activity add OK (24 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/junit/ins
#> taller/JunitSensorInstaller.java,
#> pMap=000800009className0000000012numOfMethods00001600004size00004196400
#> 015numOfStatements0000214]
Activity add OK (25 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/junit/ins
#> taller/TestJunitSensorInstaller.java,
#> pMap=001200009className0000000012numOfMethods00001400019numOfTestAssert
#> ions00001100004size00004196400015numOfStatements00001600016numOfTestMet
#> hods000013]
Activity add OK (26 total)
#> Activity [add, tool=Eclipse, type=Save File,
#> data=c:/java/cvs/hackyAnt/src/org/hackystat/stdext/sensor/ant/loadtest/
#> PerfSensorAntTask.java,
#> pMap=000800009className0000000012numOfMethods00001700004size00004196400
#> 015numOfStatements0000221]
Activity add OK (27 total)

Reply via email to