本文整理汇总了Java中org.springframework.boot.actuate.metrics.Iterables类的典型用法代码示例。如果您正苦于以下问题:Java Iterables类的具体用法?Java Iterables怎么用?Java Iterables使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Iterables类属于org.springframework.boot.actuate.metrics包,在下文中一共展示了Iterables类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setAndGet
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void setAndGet() {
this.repository.set("foo",
Arrays.<Metric<?>>asList(new Metric<Number>("foo.bar", 12.3)));
this.repository.set("foo",
Arrays.<Metric<?>>asList(new Metric<Number>("foo.bar", 15.3)));
assertThat(Iterables.collection(this.repository.findAll("foo")).iterator().next()
.getValue()).isEqualTo(15.3);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:RedisMultiMetricRepositoryTests.java
示例2: setAndGetMultiple
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void setAndGetMultiple() {
this.repository.set("foo",
Arrays.<Metric<?>>asList(new Metric<Number>("foo.val", 12.3),
new Metric<Number>("foo.bar", 11.3)));
assertThat(Iterables.collection(this.repository.findAll("foo"))).hasSize(2);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:8,代码来源:RedisMultiMetricRepositoryTests.java
示例3: prefixedMetricsCopied
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void prefixedMetricsCopied() {
this.reader.set(new Metric<Number>("foo.bar", 2.3));
this.reader.set(new Metric<Number>("foo.spam", 1.3));
this.exporter.setGroups(Collections.singleton("foo"));
this.exporter.export();
assertThat(Iterables.collection(this.writer.groups())).hasSize(1);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:PrefixMetricGroupExporterTests.java
示例4: unprefixedMetricsNotCopied
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void unprefixedMetricsNotCopied() {
this.reader.set(new Metric<Number>("foo.bar", 2.3));
this.reader.set(new Metric<Number>("foo.spam", 1.3));
this.exporter.setGroups(Collections.singleton("bar"));
this.exporter.export();
assertThat(Iterables.collection(this.writer.groups())).isEmpty();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:PrefixMetricGroupExporterTests.java
示例5: multiMetricGroupsCopiedAsDefault
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void multiMetricGroupsCopiedAsDefault() {
this.reader.set("foo", Arrays.<Metric<?>>asList(new Metric<Number>("bar", 2.3),
new Metric<Number>("spam", 1.3)));
this.exporter.export();
assertThat(this.writer.countGroups()).isEqualTo(1);
assertThat(Iterables.collection(this.writer.findAll("foo"))).hasSize(2);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:PrefixMetricGroupExporterTests.java
示例6: onlyPrefixedMetricsCopied
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void onlyPrefixedMetricsCopied() {
this.reader.set(new Metric<Number>("foo.bar", 2.3));
this.reader.set(new Metric<Number>("foo.spam", 1.3));
this.reader.set(new Metric<Number>("foobar.spam", 1.3));
this.exporter.setGroups(Collections.singleton("foo"));
this.exporter.export();
assertThat(Iterables.collection(this.writer.groups())).hasSize(1);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:PrefixMetricGroupExporterTests.java
示例7: setAndGet
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void setAndGet() {
this.repository.set("foo",
Arrays.<Metric<?>>asList(new Metric<Number>("foo.bar", 12.3)));
this.repository.set("foo",
Arrays.<Metric<?>>asList(new Metric<Number>("foo.bar", 15.3)));
assertEquals(15.3, Iterables.collection(this.repository.findAll("foo")).iterator()
.next().getValue());
}
示例8: setAndGetMultiple
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void setAndGetMultiple() {
this.repository.set("foo",
Arrays.<Metric<?>>asList(new Metric<Number>("foo.val", 12.3),
new Metric<Number>("foo.bar", 11.3)));
assertEquals(2, Iterables.collection(this.repository.findAll("foo")).size());
}
示例9: prefixedMetricsCopied
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void prefixedMetricsCopied() {
this.reader.set(new Metric<Number>("foo.bar", 2.3));
this.reader.set(new Metric<Number>("foo.spam", 1.3));
this.exporter.setGroups(Collections.singleton("foo"));
this.exporter.export();
assertEquals(1, Iterables.collection(this.writer.groups()).size());
}
示例10: unprefixedMetricsNotCopied
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void unprefixedMetricsNotCopied() {
this.reader.set(new Metric<Number>("foo.bar", 2.3));
this.reader.set(new Metric<Number>("foo.spam", 1.3));
this.exporter.setGroups(Collections.singleton("bar"));
this.exporter.export();
assertEquals(0, Iterables.collection(this.writer.groups()).size());
}
示例11: multiMetricGroupsCopiedAsDefault
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void multiMetricGroupsCopiedAsDefault() {
this.reader.set("foo", Arrays.<Metric<?>>asList(new Metric<Number>("bar", 2.3),
new Metric<Number>("spam", 1.3)));
this.exporter.export();
assertEquals(1, this.writer.countGroups());
assertEquals(2, Iterables.collection(this.writer.findAll("foo")).size());
}
示例12: onlyPrefixedMetricsCopied
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void onlyPrefixedMetricsCopied() {
this.reader.set(new Metric<Number>("foo.bar", 2.3));
this.reader.set(new Metric<Number>("foo.spam", 1.3));
this.reader.set(new Metric<Number>("foobar.spam", 1.3));
this.exporter.setGroups(Collections.singleton("foo"));
this.exporter.export();
assertEquals(1, Iterables.collection(this.writer.groups()).size());
}
示例13: findAll
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void findAll() {
this.repository.increment(new Delta<Long>("foo", 3L));
this.repository.set(new Metric<Number>("bar", 12.3));
assertThat(Iterables.collection(this.repository.findAll())).hasSize(2);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:7,代码来源:RedisMetricRepositoryTests.java
示例14: prefixedMetricsCopied
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void prefixedMetricsCopied() {
this.reader.set(new Metric<Number>("foo", 2.3));
this.exporter.export();
assertThat(Iterables.collection(this.writer.groups())).hasSize(1);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:7,代码来源:RichGaugeExporterTests.java
示例15: findAll
import org.springframework.boot.actuate.metrics.Iterables; //导入依赖的package包/类
@Test
public void findAll() {
this.repository.increment(new Delta<Long>("foo", 3L));
this.repository.set(new Metric<Number>("bar", 12.3));
assertEquals(2, Iterables.collection(this.repository.findAll()).size());
}