阅读本文,您可以获取 Java SDK 感知指标监控的接口调用示例,实现快速开发。
调用接口前,请先完成 Java SDK 的安装及初始化操作。
本节为您介绍感知指标监控相关接口的功能和调用示例。
您可以调用 DescribeImageXSensibleCountByTime 接口查询感知指标采集样本量数据。详细的参数说明可参见 DescribeImageXSensibleCountByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXSensibleCountByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXSensibleCountByTimeBody body = new DescribeImageXSensibleCountByTimeBody(); try { DescribeImageXSensibleCountByTimeRes resp = service.describeImageXSensibleCountByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXSensibleCacheHitRateByTime 接口查询感知指标内存/磁盘命中率数据。详细的参数说明可参见 DescribeImageXSensibleCacheHitRateByTime 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXSensibleCacheHitRateByTimeExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXSensibleCacheHitRateByTimeBody body = new DescribeImageXSensibleCacheHitRateByTimeBody(); try { DescribeImageXSensibleCacheHitRateByTimeRes resp = service.describeImageXSensibleCacheHitRateByTime(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXSensibleTopSizeURL 接口查询大图文件体积 Top URL 数据。详细的参数说明可参见 DescribeImageXSensibleTopSizeURL 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXSensibleTopSizeURLExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXSensibleTopSizeURLBody body = new DescribeImageXSensibleTopSizeURLBody(); try { DescribeImageXSensibleTopSizeURLRes resp = service.describeImageXSensibleTopSizeURL(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXSensibleTopRamURL 接口查询大图文件内存 Top URL 数据。详细的参数说明可参见 DescribeImageXSensibleTopRamURL 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXSensibleTopRamURLExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXSensibleTopRamURLBody body = new DescribeImageXSensibleTopRamURLBody(); try { DescribeImageXSensibleTopRamURLRes resp = service.describeImageXSensibleTopRamURL(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXSensibleTopResolutionURL 接口查询大图文件分辨率 Top URL 数据。详细的参数说明可参见 DescribeImageXSensibleTopResolutionURL 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXSensibleTopResolutionURLExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXSensibleTopResolutionURLBody body = new DescribeImageXSensibleTopResolutionURLBody(); try { DescribeImageXSensibleTopResolutionURLRes resp = service.describeImageXSensibleTopResolutionURL(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }
您可以调用 DescribeImageXSensibleTopUnknownURL 接口查询大图文件未知原因 Top URL 列表。详细的参数说明可参见 DescribeImageXSensibleTopUnknownURL 接口文档。
接口调用示例如下所示。
package com.volcengine.example.imagex.v2.api; import com.volcengine.model.imagex.v2.*; import com.volcengine.service.imagex.v2.ImagexService; public class DescribeImageXSensibleTopUnknownURLExample { public static void main(String[] args) { ImagexService service = ImagexService.getInstance(); service.setAccessKey("ak"); service.setSecretKey("sk"); DescribeImageXSensibleTopUnknownURLBody body = new DescribeImageXSensibleTopUnknownURLBody(); try { DescribeImageXSensibleTopUnknownURLRes resp = service.describeImageXSensibleTopUnknownURL(body); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); } } }