problème d'instrumentation une méthode
Bonjour
j'ai une méthode dans le code est :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| public synchronized void store() {
String[] titles = (String[])titleList.toArray( EMPTY_STRING_LIST );
String[] bodies = (String[])bodyList.toArray( EMPTY_STRING_LIST );
try {
pref.setValues( BODY_PREFIX + category, bodies );
pref.setValues( TITLE_PREFIX + category, titles );
pref.store();
} catch( Exception e ) {
}
} |
je veux tester l'amélioration du lock coarsening qui consiste a fusionner des bloc sychronized. lorsque j'utilise la méthode d'origine (ci dessus) l'outils d'instrumentation me retourne parfaitement les temps de réponses
mais lorsque j'utilise ce code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| public synchronized void store() {
String[] titles = (String[])titleList.toArray( EMPTY_STRING_LIST );
String[] bodies = (String[])bodyList.toArray( EMPTY_STRING_LIST );
try {
synchronized (pref){
pref.setValues( BODY_PREFIX + category, bodies );
}
pref.setValues( TITLE_PREFIX + category, titles );
synchronized (pref){
pref.store();
}
} catch( Exception e ) {
}
} |
l'outils d'instrumentation ne retourne rien commen métrique malgré que ça compile et fonctionne.
Est ce qu'il y a un problème avec la deuxième méthode ou c'est juste un bug dans l'outils d'instrumentation que j'utilise