Java Code Examples for jdk.jfr.Configuration#getName()

The following examples show how to use jdk.jfr.Configuration#getName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConfigurationInfo.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
ConfigurationInfo(Configuration config) {
    this.settings = config.getSettings();
    this.name = config.getName();
    this.label = config.getLabel();
    this.description = config.getDescription();
    this.provider = config.getProvider();
    this.contents = config.getContents();
}
 
Example 2
Source File: TestConfigurationGetContents.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Throwable {
    List<Configuration> predefinedConfigs = Configuration.getConfigurations();

    Asserts.assertNotNull(predefinedConfigs, "List of predefined configs is null");
    Asserts.assertTrue(predefinedConfigs.size() > 0, "List of predefined configs is empty");

    for (Configuration conf : predefinedConfigs) {
        String name = conf.getName();
        System.out.println("Verifying configuration " + name);
        String fpath = JFR_DIR + name + ".jfc";
        String contents = conf.getContents();
        String fileContents = readFile(fpath);
        Asserts.assertEquals(fileContents, contents, "getContents() does not return the actual contents of the file " + fpath);
    }
}
 
Example 3
Source File: ConfigurationInfo.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
ConfigurationInfo(Configuration config) {
    this.settings = config.getSettings();
    this.name = config.getName();
    this.label = config.getLabel();
    this.description = config.getDescription();
    this.provider = config.getProvider();
    this.contents = config.getContents();
}
 
Example 4
Source File: TestConfigurationGetContents.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Throwable {
    List<Configuration> predefinedConfigs = Configuration.getConfigurations();

    Asserts.assertNotNull(predefinedConfigs, "List of predefined configs is null");
    Asserts.assertTrue(predefinedConfigs.size() > 0, "List of predefined configs is empty");

    for (Configuration conf : predefinedConfigs) {
        String name = conf.getName();
        System.out.println("Verifying configuration " + name);
        String fpath = JFR_DIR + name + ".jfc";
        String contents = conf.getContents();
        String fileContents = readFile(fpath);
        Asserts.assertEquals(fileContents, contents, "getContents() does not return the actual contents of the file " + fpath);
    }
}
 
Example 5
Source File: ConfigurationInfo.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
ConfigurationInfo(Configuration config) {
    this.settings = config.getSettings();
    this.name = config.getName();
    this.label = config.getLabel();
    this.description = config.getDescription();
    this.provider = config.getProvider();
    this.contents = config.getContents();
}
 
Example 6
Source File: TestConfigurationGetContents.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Throwable {
    List<Configuration> predefinedConfigs = Configuration.getConfigurations();

    Asserts.assertNotNull(predefinedConfigs, "List of predefined configs is null");
    Asserts.assertTrue(predefinedConfigs.size() > 0, "List of predefined configs is empty");

    for (Configuration conf : predefinedConfigs) {
        String name = conf.getName();
        System.out.println("Verifying configuration " + name);
        String fpath = JFR_DIR + name + ".jfc";
        String contents = conf.getContents();
        String fileContents = readFile(fpath);
        Asserts.assertEquals(fileContents, contents, "getContents() does not return the actual contents of the file " + fpath);
    }
}