| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,18 +15,29 @@ | |||
| 15 | 15 | public class MemoryStatsConfig implements Serializable { | |
| 16 | 16 | private static final long serialVersionUID = 1L; | |
| 17 | 17 | ||
| 18 | + @JsonProperty("stats") | ||
| 19 | + private StatsConfig stats; | ||
| 20 | + | ||
| 18 | 21 | @JsonProperty("usage") | |
| 19 | 22 | private Long usage; | |
| 20 | 23 | ||
| 21 | 24 | @JsonProperty("max_usage") | |
| 22 | 25 | private Long maxUsage; | |
| 23 | 26 | ||
| 24 | - @JsonProperty("stats") | ||
| 25 | - private StatsConfig stats; | ||
| 27 | + @JsonProperty("failcnt") | ||
| 28 | + private Long failcnt; | ||
| 26 | 29 | ||
| 27 | 30 | @JsonProperty("limit") | |
| 28 | 31 | private Long limit; | |
| 29 | 32 | ||
| 33 | + /** | ||
| 34 | + * @see #stats | ||
| 35 | + */ | ||
| 36 | + @CheckForNull | ||
| 37 | + public StatsConfig getStats() { | ||
| 38 | + return stats; | ||
| 39 | + } | ||
| 40 | + | ||
| 30 | 41 | /** | |
| 31 | 42 | * @see #usage | |
| 32 | 43 | */ | |
@@ -44,11 +55,10 @@ public Long getMaxUsage() { | |||
| 44 | 55 | } | |
| 45 | 56 | ||
| 46 | 57 | /** | |
| 47 | - * @see #stats | ||
| 58 | + * @see #failcnt | ||
| 48 | 59 | */ | |
| 49 | - @CheckForNull | ||
| 50 | - public StatsConfig getStats() { | ||
| 51 | - return stats; | ||
| 60 | + public Long getFailcnt() { | ||
| 61 | + return failcnt; | ||
| 52 | 62 | } | |
| 53 | 63 | ||
| 54 | 64 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,7 @@ | |||
| 3 | 3 | import com.fasterxml.jackson.databind.JavaType; | |
| 4 | 4 | import com.fasterxml.jackson.databind.ObjectMapper; | |
| 5 | 5 | import com.github.dockerjava.core.RemoteApiVersion; | |
| 6 | + import org.hamcrest.Matchers; | ||
| 6 | 7 | import org.junit.Test; | |
| 7 | 8 | ||
| 8 | 9 | import java.io.IOException; | |
@@ -82,11 +83,26 @@ public void serderJson1() throws IOException { | |||
| 82 | 83 | assertThat(stats.getWriteback(), is(0L)); | |
| 83 | 84 | ||
| 84 | 85 | assertThat(memoryStats.getLimit(), is(2095874048L)); | |
| 86 | + assertThat(memoryStats.getFailcnt(), is(0L)); | ||
| 85 | 87 | ||
| 86 | 88 | final BlkioStatsConfig blkioStats = statistics.getBlkioStats(); | |
| 87 | - assertThat(blkioStats.getIoServiceBytesRecursive().size(), is(2)); | ||
| 88 | - assertThat(blkioStats.getIoServiceBytesRecursive().get(0).getValue(), is(26214L)); | ||
| 89 | - assertThat(blkioStats.getIoServicedRecursive().size(), is(2)); | ||
| 89 | + assertThat(blkioStats.getIoServiceBytesRecursive(), Matchers.<BlkioStatEntry>hasSize(5)); | ||
| 90 | + assertThat(blkioStats.getIoServiceBytesRecursive(), equalTo(Arrays.asList( | ||
| 91 | + new BlkioStatEntry().withMajor(259L).withMinor(0L).withOp("Read").withValue(823296L), | ||
| 92 | + new BlkioStatEntry().withMajor(259L).withMinor(0L).withOp("Write").withValue(122880L), | ||
| 93 | + new BlkioStatEntry().withMajor(259L).withMinor(0L).withOp("Sync").withValue(835584L), | ||
| 94 | + new BlkioStatEntry().withMajor(259L).withMinor(0L).withOp("Async").withValue(110592L), | ||
| 95 | + new BlkioStatEntry().withMajor(259L).withMinor(0L).withOp("Total").withValue(946176L) | ||
| 96 | + ))); | ||
| 97 | + | ||
| 98 | + assertThat(blkioStats.getIoServicedRecursive(), Matchers.<BlkioStatEntry>hasSize(5)); | ||
| 99 | + assertThat(blkioStats.getIoServicedRecursive(), equalTo(Arrays.asList( | ||
| 100 | + new BlkioStatEntry().withMajor(259L).withMinor(0L).withOp("Read").withValue(145L), | ||
| 101 | + new BlkioStatEntry().withMajor(259L).withMinor(0L).withOp("Write").withValue(4L), | ||
| 102 | + new BlkioStatEntry().withMajor(259L).withMinor(0L).withOp("Sync").withValue(148L), | ||
| 103 | + new BlkioStatEntry().withMajor(259L).withMinor(0L).withOp("Async").withValue(1L), | ||
| 104 | + new BlkioStatEntry().withMajor(259L).withMinor(0L).withOp("Total").withValue(149L) | ||
| 105 | + ))); | ||
| 90 | 106 | assertThat(blkioStats.getIoQueueRecursive(), is(empty())); | |
| 91 | 107 | assertThat(blkioStats.getIoServiceTimeRecursive(), is(empty())); | |
| 92 | 108 | assertThat(blkioStats.getIoWaitTimeRecursive(), is(empty())); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,32 +5,68 @@ | |||
| 5 | 5 | "current":2 | |
| 6 | 6 | }, | |
| 7 | 7 | "blkio_stats":{ | |
| 8 | - "io_service_bytes_recursive": [ | ||
| 8 | + "io_service_bytes_recursive":[ | ||
| 9 | 9 | { | |
| 10 | - "major": 8, | ||
| 11 | - "minor": "0", | ||
| 12 | - "op": "Read", | ||
| 13 | - "value": 26214 | ||
| 10 | + "major":259, | ||
| 11 | + "minor":0, | ||
| 12 | + "op":"Read", | ||
| 13 | + "value":823296 | ||
| 14 | 14 | }, | |
| 15 | 15 | { | |
| 16 | - "major": 8, | ||
| 17 | - "minor": "0", | ||
| 18 | - "op": "Write", | ||
| 19 | - "value": 26214 | ||
| 16 | + "major":259, | ||
| 17 | + "minor":0, | ||
| 18 | + "op":"Write", | ||
| 19 | + "value":122880 | ||
| 20 | + }, | ||
| 21 | + { | ||
| 22 | + "major":259, | ||
| 23 | + "minor":0, | ||
| 24 | + "op":"Sync", | ||
| 25 | + "value":835584 | ||
| 26 | + }, | ||
| 27 | + { | ||
| 28 | + "major":259, | ||
| 29 | + "minor":0, | ||
| 30 | + "op":"Async", | ||
| 31 | + "value":110592 | ||
| 32 | + }, | ||
| 33 | + { | ||
| 34 | + "major":259, | ||
| 35 | + "minor":0, | ||
| 36 | + "op":"Total", | ||
| 37 | + "value":946176 | ||
| 20 | 38 | } | |
| 21 | 39 | ], | |
| 22 | - "io_serviced_recursive": [ | ||
| 40 | + "io_serviced_recursive":[ | ||
| 41 | + { | ||
| 42 | + "major":259, | ||
| 43 | + "minor":0, | ||
| 44 | + "op":"Read", | ||
| 45 | + "value":145 | ||
| 46 | + }, | ||
| 47 | + { | ||
| 48 | + "major":259, | ||
| 49 | + "minor":0, | ||
| 50 | + "op":"Write", | ||
| 51 | + "value":4 | ||
| 52 | + }, | ||
| 53 | + { | ||
| 54 | + "major":259, | ||
| 55 | + "minor":0, | ||
| 56 | + "op":"Sync", | ||
| 57 | + "value":148 | ||
| 58 | + }, | ||
| 23 | 59 | { | |
| 24 | - "major": 8, | ||
| 25 | - "minor": 0, | ||
| 26 | - "op": "Read", | ||
| 27 | - "value": 41771 | ||
| 60 | + "major":259, | ||
| 61 | + "minor":0, | ||
| 62 | + "op":"Async", | ||
| 63 | + "value":1 | ||
| 28 | 64 | }, | |
| 29 | 65 | { | |
| 30 | - "major": 8, | ||
| 31 | - "minor": 0, | ||
| 32 | - "op": "Write", | ||
| 33 | - "value": 72796 | ||
| 66 | + "major":259, | ||
| 67 | + "minor":0, | ||
| 68 | + "op":"Total", | ||
| 69 | + "value":149 | ||
| 34 | 70 | } | |
| 35 | 71 | ], | |
| 36 | 72 | "io_queue_recursive":[ | |
@@ -135,7 +171,8 @@ | |||
| 135 | 171 | "unevictable":0, | |
| 136 | 172 | "writeback":0 | |
| 137 | 173 | }, | |
| 138 | - "limit":2095874048 | ||
| 174 | + "limit":2095874048, | ||
| 175 | + "failcnt":0 | ||
| 139 | 176 | }, | |
| 140 | 177 | "name":"/gallant_hamilton", | |
| 141 | 178 | "id":"b581d78b03e41d81c9fe941f03f5d35e23733ff96370456b58d2906e002b0deb", | |
| Back | FazBrowse Home | New Git URL |
0 commit comments