Version|0.2
Log Level|4
Debug Print|N
-Available Target List|mobile-2.3.0|mobile-2.3.1|mobile-2.4.0
-Selected Target|mobile-2.3.0
+Available Target List|mobile
+Selected Target|mobile
Selected Chart List|CPU|CPU core|CPU frequency
Default Chart List|CPU|CPU core|CPU frequency
Options Selected Feature List|5002:0
Default Feature List|2|3|103
Total Overhead Range|1000000|3000000|7000000|15000000
-mobile-2.3.0|Protocol Version|3.0
-mobile-2.3.0|Available Template List|1|2|3|4|5|6|7|8|9|10
-mobile-2.3.0|Selected Template|1
-mobile-2.3.0|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
-mobile-2.3.0|Selected Feature List|1|5|1000:1000|100|101|1001:10
-mobile-2.3.0|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
-mobile-2.3.1|Protocol Version|3.0
-mobile-2.3.1|Available Template List|1|2|3|4|5|6|7|8|9|10
-mobile-2.3.1|Selected Template|1
-mobile-2.3.1|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
-mobile-2.3.1|Selected Feature List|1|5|1000:1000|100|101|1001:10
-mobile-2.3.1|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
-mobile-2.4.0|Protocol Version|4.0
-mobile-2.4.0|Available Template List|1|2|3|4|5|6|7|8|9|10
-mobile-2.4.0|Selected Template|1
-mobile-2.4.0|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
-mobile-2.4.0|Selected Feature List|1|5|1000:1000|100|101|1001:10
-mobile-2.4.0|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
-wearable-2.3|Protocol Version|3.0
-wearable-2.3|Available Template List|1|2|3|4|5|6|7|8|9|10
-wearable-2.3|Selected Template|1
-wearable-2.3|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
-wearable-2.3|Selected Feature List|1|5|1000:1000|100|101|1001:10
-wearable-2.3|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
-tv-1.0|Protocol Version|3.0
-tv-1.0|Available Template List|1|3|9|10
-tv-1.0|Selected Template|1
-tv-1.0|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|204
-tv-1.0|Selected Feature List|1|5|1000:1000|100|101|1001:10
-tv-1.0|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
+mobile|Protocol Version|3.0
+mobile|Available Template List|1|2|3|4|5|6|7|8|9|10
+mobile|Selected Template|1
+mobile|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
+mobile|Selected Feature List|1|5|1000:1000|100|101|1001:10
+mobile|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
+wearable|Protocol Version|3.0
+wearable|Available Template List|1|2|3|4|5|6|7|8|9|10
+wearable|Selected Template|1
+wearable|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
+wearable|Selected Feature List|1|5|1000:1000|100|101|1001:10
+wearable|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
+tv|Protocol Version|3.0
+tv|Available Template List|1|3|9|10
+tv|Selected Template|1
+tv|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|204
+tv|Selected Feature List|1|5|1000:1000|100|101|1001:10
+tv|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
private Map<String, PackageInfo> pkgInfoHash = new HashMap<String, PackageInfo>();
private DeviceStatusInfo statusInfo = null;
- private String platformName = null;
+ private String profileName = null;
public EmulatorScreenshot emulatorScreenshot = null;
}
public String getPlatformName() {
- if (platformName == null) {
- platformName = ProfileInfo.getPlatformName(device); // mobile-2.3.0
- // device.getPlatformInfo().getProfileName(); // mobile
-
- if (platformName == null) {
- platformName = CommonConstants.EMPTY;
+ if (profileName == null) {
+// platformName = ProfileInfo.getPlatformName(device); // mobile-2.3.0
+// profileName = device.getPlatformInfo().getProfileName(); // mobile
+ ProfileInfo profile = ProfileInfo.getProfileInfo(device);
+ if (profile != null) {
+ profileName = profile.getProfile(); // mobile
+ }
+
+ if (profileName == null) {
+ profileName = CommonConstants.EMPTY;
}
}
-
- return platformName;
+ return profileName;
}
public boolean isEmulator() {
public static String SETTING_WARNING_MESSAGE_SETTING_FAIL;
public static String SETTING_WARNING_MESSAGE_SETTING_INVALID_INPUT_VALUE;
- public static String TARGET_NAME_MOBILE_2_3;
- public static String TARGET_NAME_MOBILE_2_3_1;
- public static String TARGET_NAME_MOBILE_2_4;
- public static String TARGET_NAME_TV_1_0;
- public static String TARGET_NAME_WEARABLE_2_3;
+ public static String TARGET_NAME_MOBILE;
+ public static String TARGET_NAME_TV;
+ public static String TARGET_NAME_WEARABLE;
public static String TEMPLATE_NAME_BOTTLENECK;
public static String TEMPLATE_NAME_MEMORY_LEAKS;
SETTING_DIALOG_RECORDING_REPLAY=Recording / Replay
SETTING_DIALOG_SCREENSHOT=Screenshot
-TARGET_NAME_MOBILE_2_3=mobile-2.3
-TARGET_NAME_MOBILE_2_3_1=mobile-2.3.1
-TARGET_NAME_MOBILE_2_4=mobile-2.4
-TARGET_NAME_TV_1_0=tv-1.0
-TARGET_NAME_WEARABLE_2_3=wearable-2.3
+TARGET_NAME_MOBILE=mobile
+TARGET_NAME_TV=tv
+TARGET_NAME_WEARABLE=wearable
TEMPLATE_NAME_BOTTLENECK=Bottleneck
TEMPLATE_NAME_MEMORY_LEAKS=Memory Leaks
public class SettingDialogTemplatePage extends DAPageComposite {
private enum ProfileDisplayInfo {
- PROFILE_NAME_MOBILE_2_3_0(0, "mobile-2.3.0",
- ConfigureLabels.TARGET_NAME_MOBILE_2_3, ImageResources.TARGET_NAME_MOBILE),
- PROFILE_NAME_MOBILE_2_3_1(1, "mobile-2.3.1",
- ConfigureLabels.TARGET_NAME_MOBILE_2_3_1, ImageResources.TARGET_NAME_MOBILE),
- PROFILE_NAME_MOBILE_2_4_0(2, "mobile-2.4.0",
- ConfigureLabels.TARGET_NAME_MOBILE_2_4, ImageResources.TARGET_NAME_MOBILE),
- PROFILE_NAME_TV_1_0(3, "tv-1.0",
- ConfigureLabels.TARGET_NAME_TV_1_0, ImageResources.TARGET_NAME_TV),
- PROFILE_NAME_WEARABLE_2_3(4, "wearable-2.3",
- ConfigureLabels.TARGET_NAME_WEARABLE_2_3, ImageResources.TARGET_NAME_WEARABLE);
+ PROFILE_NAME_MOBILE(0, ConfigureLabels.TARGET_NAME_MOBILE, ImageResources.TARGET_NAME_MOBILE),
+ PROFILE_NAME_TV(1, ConfigureLabels.TARGET_NAME_TV, ImageResources.TARGET_NAME_TV),
+ PROFILE_NAME_WEARABLE(2, ConfigureLabels.TARGET_NAME_WEARABLE, ImageResources.TARGET_NAME_WEARABLE);
private int id = -1;
- private String versionName = null;
private String displayName = null;
private Image image = null;
- private ProfileDisplayInfo(int id, String versionName, String displayName, Image image) {
+ private ProfileDisplayInfo(int id, String displayName, Image image) {
this.id = id;
- this.versionName = versionName;
this.displayName = displayName;
this.image = image;
}
- public static String getVersionName(String displayName) {
- ProfileDisplayInfo[] versions = ProfileDisplayInfo.values();
- for (ProfileDisplayInfo ver : versions) {
- if (ver.displayName.equals(displayName)) {
- return ver.versionName;
- }
- }
- return null;
- }
-
- public static String getDisplayName(String versionName) {
- ProfileDisplayInfo[] versions = ProfileDisplayInfo.values();
- for (ProfileDisplayInfo ver : versions) {
- if (ver.versionName.equals(versionName)) {
- return ver.displayName;
- }
- }
- return null;
- }
-
- public static Image getImage(String versionName) {
- ProfileDisplayInfo[] versions = ProfileDisplayInfo.values();
- for (ProfileDisplayInfo ver : versions) {
- if (ver.versionName.equals(versionName)) {
- return ver.image;
+ public static Image getImage(String displayName) {
+ ProfileDisplayInfo[] profiles = ProfileDisplayInfo.values();
+ for (ProfileDisplayInfo profile : profiles) {
+ if (profile.displayName.equals(displayName)) {
+ return profile.image;
}
}
return null;
}
public static Image getImage(String displayName) {
- TemplateDisplayInfo[] versions = TemplateDisplayInfo.values();
- for (TemplateDisplayInfo ver : versions) {
- if (ver.displayName.equals(displayName)) {
- return ver.image;
+ TemplateDisplayInfo[] templates = TemplateDisplayInfo.values();
+ for (TemplateDisplayInfo template : templates) {
+ if (template.displayName.equals(displayName)) {
+ return template.image;
}
}
return null;
DACustomToggleButton toggle = createToggleButton(targetInputComposite,
ProfileDisplayInfo.getImage(target.getTargetName()), imagePoint,
- ProfileDisplayInfo.getDisplayName(target.getTargetName()),
- fontPoint, 76, 76, topPosition, leftPosition);
+ target.getTargetName(), fontPoint, 76, 76, topPosition, leftPosition);
targetGroup.addToggleButton(toggle);
// listener
if (toggleButton.isToggled()) {
// set selected target
- SettingDataManager.INSTANCE.setSelectedTarget(
- ProfileDisplayInfo.getVersionName(toggleButton.getText()));
+ SettingDataManager.INSTANCE.setSelectedTarget(toggleButton.getText());
// update template view
createTemplateTitleComposite();
@AfterClass
public static void tesApplySettingData() {
// change selected target, options feature
- SettingDataManager.INSTANCE.setSelectedTarget("wearable-2.3");
+ SettingDataManager.INSTANCE.setSelectedTarget("wearable");
SettingDataManager.INSTANCE.addOptionsSelectedFeature(Feature.SCREENSHOT_PERIODICALLY, 50);
assertTrue(SettingDataManager.INSTANCE.changedFeatures());
// check init target
String initTarget = Whitebox.getInternalState(SettingDataManager.INSTANCE, "initTarget");
- assertEquals("wearable-2.3", initTarget);
+ assertEquals("wearable", initTarget);
// check initOptionsSelectedFeatureList
List<FeatureValueData> initOptionsSelectedFeatureList = Whitebox.getInternalState(
public void testInitSettingData() {
// check Available Target List
Map<String, TargetData> targetListMap = setting.getTargetListMap();
- assertEquals(3, targetListMap.size());
- assertTrue(setting.isTarget("mobile-2.3.0"));
- assertFalse(setting.isTarget("wearable-2.3"));
+ assertEquals(1, targetListMap.size());
+ assertTrue(setting.isTarget("mobile"));
+ assertFalse(setting.isTarget("wearable"));
// check Selected Target
- assertEquals("mobile-2.3.0", setting.getSelectedTarget());
+ assertEquals("mobile", setting.getSelectedTarget());
String initTarget = Whitebox.getInternalState(setting, "initTarget");
- assertEquals("mobile-2.3.0", initTarget);
+ assertEquals("mobile", initTarget);
// check Selected Chart List
List<String> chartList = setting.getSelectedChartList();
public void testWriteTargetData() {
try {
String result = Whitebox.invokeMethod(setting, "writeTargetData");
- assertEquals("Available Target List|mobile-2.3.0|mobile-2.3.1|mobile-2.4.0", result);
+ assertEquals("Available Target List|mobile", result);
} catch (Exception e) {
Logger.exception(e);
}
@Test
public void testProtocolOperation() {
try {
- int level = setting.getSelectedOverheadLevel("mobile-2.3.0");
+ int level = setting.getSelectedOverheadLevel("mobile");
assertEquals(1, level);
long featureOverheadValue = Whitebox.invokeMethod(setting, "getFeatureOverheadValue",
- setting.getTarget("mobile-2.3.0"), Feature.OPENGL_ANALYSIS, false);
+ setting.getTarget("mobile"), Feature.OPENGL_ANALYSIS, false);
assertEquals(800000, featureOverheadValue);
double count = Whitebox.invokeMethod(setting, "calculateCallcount", (Object) null,
Logger.exception(e);
}
- TargetData target = setting.getTarget("wearable-2.3");
+ TargetData target = setting.getTarget("wearable");
assertNull(target);
- target = setting.getTarget("mobile-2.3.0");
+ target = setting.getTarget("mobile");
assertNotNull(target);
Set<String> list = setting.getSelectedPageList("test-target");
assertNull(list);
- list = setting.getSelectedPageList("mobile-2.3.0");
+ list = setting.getSelectedPageList("mobile");
assertEquals(2, list.size());
assertTrue(list.contains("Timeline"));
assertTrue(list.contains("Summary"));
list = setting.getSelectedChartList("test-target");
assertNull(list);
- list = setting.getSelectedChartList("mobile-2.3.0");
+ list = setting.getSelectedChartList("mobile");
assertEquals(1, list.size());
assertTrue(list.contains("CPU"));
@Test
public void testChangedFeatures() {
// change target
- setting.setSelectedTarget("wearable-2.3");
+ setting.setSelectedTarget("wearable");
assertTrue(setting.changedFeatures());
- setting.setSelectedTarget("mobile-2.3.0");
+ setting.setSelectedTarget("mobile");
// change options feature
setting.addOptionsSelectedFeature(Feature.SCREENSHOT_PERIODICALLY, 50);
@Test
public void testRevertSettingData() {
// change selected target, options feature
- setting.setSelectedTarget("wearable-2.3");
+ setting.setSelectedTarget("wearable");
setting.addOptionsSelectedFeature(Feature.SCREENSHOT_PERIODICALLY, 50);
assertTrue(setting.changedFeatures());
setting.revertSettingData();
// check selected target
- assertEquals("mobile-2.3.0", setting.getSelectedTarget());
+ assertEquals("mobile", setting.getSelectedTarget());
// check selected options feature
List<FeatureValueData> featureList = setting.getOptionsSelectedFeatureList();
Version|0.2
Log Level|4
-Available Target List|mobile-2.3.0|mobile-2.3.1|mobile-2.4.0
-Selected Target|mobile-2.3.0
+Debug Print|N
+Available Target List|mobile
+Selected Target|mobile
Selected Chart List|CPU|CPU core|CPU frequency
Default Chart List|CPU|CPU core|CPU frequency
Options Selected Feature List|5002:0
Default Feature List|2|3|103
Total Overhead Range|1000000|3000000|7000000|15000000
-mobile-2.3.0|Protocol Version|3.0
-mobile-2.3.0|Available Template List|1|2|3|4|5|6|7|8|9|10
-mobile-2.3.0|Selected Template|1
-mobile-2.3.0|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
-mobile-2.3.0|Selected Feature List|1|5|1000:1000|100|101|1001:10
-mobile-2.3.0|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
-mobile-2.3.1|Protocol Version|3.0
-mobile-2.3.1|Available Template List|1|2|3|4|5|6|7|8|9|10
-mobile-2.3.1|Selected Template|1
-mobile-2.3.1|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
-mobile-2.3.1|Selected Feature List|1|5|1000:1000|100|101|1001:10
-mobile-2.3.1|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
-mobile-2.4.0|Protocol Version|4.0
-mobile-2.4.0|Available Template List|1|2|3|4|5|6|7|8|9|10
-mobile-2.4.0|Selected Template|1
-mobile-2.4.0|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
-mobile-2.4.0|Selected Feature List|1|5|1000:1000|100|101|1001:10
-mobile-2.4.0|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
-wearable-2.3|Protocol Version|3.0
-wearable-2.3|Available Template List|1|2|3|4|5|6|7|8|9|10
-wearable-2.3|Selected Template|1
-wearable-2.3|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
-wearable-2.3|Selected Feature List|1|5|1000:1000|100|101|1001:10
-wearable-2.3|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
-tv-1.0|Protocol Version|3.0
-tv-1.0|Available Template List|1|3|9|10
-tv-1.0|Selected Template|1
-tv-1.0|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|204
-tv-1.0|Selected Feature List|1|5|1000:1000|100|101|1001:10
-tv-1.0|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
+mobile|Protocol Version|3.0
+mobile|Available Template List|1|2|3|4|5|6|7|8|9|10
+mobile|Selected Template|1
+mobile|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
+mobile|Selected Feature List|1|5|1000:1000|100|101|1001:10
+mobile|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
+wearable|Protocol Version|3.0
+wearable|Available Template List|1|2|3|4|5|6|7|8|9|10
+wearable|Selected Template|1
+wearable|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|102|200|201|202|203|204
+wearable|Selected Feature List|1|5|1000:1000|100|101|1001:10
+wearable|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy
+tv|Protocol Version|3.0
+tv|Available Template List|1|3|9|10
+tv|Selected Template|1
+tv|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|204
+tv|Selected Feature List|1|5|1000:1000|100|101|1001:10
+tv|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|UI event|Disk IO|Network IO|Device|Energy