in src/main/java/com/aliyun/openservices/log/sample/LogtailConfigSample.java [205:257]
public void ListConfigs() {
try {
long s_t = System.currentTimeMillis();
ListConfigResponse res = client.ListConfig(project);
long e_t = System.currentTimeMillis();
System.out.print("ms:" + (e_t - s_t));
System.out.println("RequestId:" + res.GetRequestId());
int total = res.GetTotal();
int cout = res.GetCount();
System.out.println("total:" + total);
System.out.println("Count:" + cout);
System.out.println("ConfigNames:" + res.GetConfigs().toString());
// add config name filter
res = client.ListConfig(project, "nonexist", 0, 100);
e_t = System.currentTimeMillis();
System.out.print("ms:" + (e_t - s_t));
System.out.println("RequestId:" + res.GetRequestId());
total = res.GetTotal();
cout = res.GetCount();
System.out.println("total:" + total);
System.out.println("Count:" + cout);
System.out.println("ConfigNames:" + res.GetConfigs().toString());
res = client.ListConfig(project, testConfigName, 0, 100);
e_t = System.currentTimeMillis();
System.out.print("ms:" + (e_t - s_t));
System.out.println("RequestId:" + res.GetRequestId());
total = res.GetTotal();
cout = res.GetCount();
System.out.println("total:" + total);
System.out.println("Count:" + cout);
System.out.println("ConfigNames:" + res.GetConfigs().toString());
res = client.ListConfig(project, testConfigName, "perfcounter", 0, 100);
e_t = System.currentTimeMillis();
System.out.print("ms:" + (e_t - s_t));
System.out.println("RequestId:" + res.GetRequestId());
total = res.GetTotal();
cout = res.GetCount();
System.out.println("total:" + total);
System.out.println("Count:" + cout);
System.out.println("ConfigNames:" + res.GetConfigs().toString());
res = client.ListConfig(project, testConfigName, "perfcounter1", 0, 100);
e_t = System.currentTimeMillis();
System.out.print("ms:" + (e_t - s_t));
System.out.println("RequestId:" + res.GetRequestId());
total = res.GetTotal();
cout = res.GetCount();
System.out.println("total:" + total);
System.out.println("Count:" + cout);
System.out.println("ConfigNames:" + res.GetConfigs().toString());
} catch (LogException e) {
e.printStackTrace();
}
}