-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate more things that somehow got missed
- Loading branch information
Showing
10 changed files
with
1,371 additions
and
2 deletions.
There are no files selected for viewing
797 changes: 797 additions & 0 deletions
797
java/test/auto_check_sbp_profiling_MsgProfilingResourceCounterTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
88 changes: 88 additions & 0 deletions
88
java/test/auto_check_sbp_profiling_MsgProfilingSystemInfoTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* Copyright (C) 2015-2022 Swift Navigation Inc. | ||
* Contact: https://support.swiftnav.com | ||
* | ||
* This source is subject to the license found in the file 'LICENSE' which must | ||
* be be distributed together with this source. All other rights reserved. | ||
* | ||
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, | ||
* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED | ||
* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
package com.swiftnav.sbp.test; | ||
|
||
// This file was auto-generated from | ||
// spec/tests/yaml/swiftnav/sbp/profiling/test_MsgProfilingSystemInfo.yaml by generate.py. Do not | ||
// modify by hand! | ||
|
||
|
||
import com.swiftnav.sbp.SBPMessage; | ||
import com.swiftnav.sbp.profiling.MsgProfilingSystemInfo; | ||
import java.math.BigInteger; | ||
import org.json.JSONObject; | ||
import org.junit.Test; | ||
|
||
public class auto_check_sbp_profiling_MsgProfilingSystemInfoTest { | ||
|
||
public static boolean debug = false; | ||
private static final double DELTA = 1e-15; | ||
|
||
@Test | ||
public void test1() throws Throwable { | ||
if (debug) | ||
System.out.format( | ||
"%n%s%n", "auto_check_sbp_profiling_MsgProfilingSystemInfoTest.test1"); | ||
byte[] payload = | ||
new byte[] { | ||
(byte) 98, (byte) 40, (byte) 52, (byte) 0, (byte) 0, (byte) 0, (byte) 0, | ||
(byte) 0, (byte) 114, (byte) 12, (byte) 157, (byte) 0, (byte) 0, (byte) 0, | ||
(byte) 0, (byte) 0, (byte) 27, (byte) 72, (byte) 195, (byte) 226, (byte) 0, | ||
}; | ||
SBPMessage sbp = new SBPMessage(0x1000, 0xcf01, payload); | ||
MsgProfilingSystemInfo msg = new MsgProfilingSystemInfo(sbp); | ||
JSONObject json = msg.toJSON(); | ||
Number value; | ||
Number expected; | ||
value = msg.age; | ||
if (value instanceof BigInteger) { | ||
org.junit.Assert.assertTrue( | ||
"'" + msg.age + "' != '" + 10292338 + "'", | ||
value.equals(BigInteger.valueOf(10292338L))); | ||
} else { | ||
value = value.longValue(); | ||
expected = 10292338L; | ||
org.junit.Assert.assertEquals(value, expected); | ||
} | ||
value = msg.heap_usage; | ||
if (value instanceof BigInteger) { | ||
org.junit.Assert.assertTrue( | ||
"'" + msg.heap_usage + "' != '" + 14861128 + "'", | ||
value.equals(BigInteger.valueOf(14861128L))); | ||
} else { | ||
value = value.longValue(); | ||
expected = 14861128L; | ||
org.junit.Assert.assertEquals(value, expected); | ||
} | ||
value = msg.n_threads; | ||
if (value instanceof BigInteger) { | ||
org.junit.Assert.assertTrue( | ||
"'" + msg.n_threads + "' != '" + 27 + "'", | ||
value.equals(BigInteger.valueOf(27L))); | ||
} else { | ||
value = value.longValue(); | ||
expected = 27L; | ||
org.junit.Assert.assertEquals(value, expected); | ||
} | ||
value = msg.total_cpu_time; | ||
if (value instanceof BigInteger) { | ||
org.junit.Assert.assertTrue( | ||
"'" + msg.total_cpu_time + "' != '" + 3418210 + "'", | ||
value.equals(BigInteger.valueOf(3418210L))); | ||
} else { | ||
value = value.longValue(); | ||
expected = 3418210L; | ||
org.junit.Assert.assertEquals(value, expected); | ||
} | ||
|
||
org.junit.Assert.assertNotEquals("", msg.getFriendlyName()); | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"copyright": [ | ||
"Copyright (C) 2019-2021 Swift Navigation Inc.", | ||
"Contact: https://support.swiftnav.com", | ||
"", | ||
"This source is subject to the license found in the file 'LICENSE' which must", | ||
"be be distributed together with this source. All other rights reserved.", | ||
"", | ||
"THIS CODE AND INFORMATION IS PROVIDED 'AS IS' WITHOUT WARRANTY OF ANY KIND,", | ||
"EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED", | ||
"WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE." | ||
], | ||
"$schema": "http://json-schema.org/draft-06/schema#", | ||
"$id": "#MsgProfilingResourceCounter", | ||
"title":"MsgProfilingResourceCounter", | ||
"description":"Information about resource buckets. Refer to product documentation to understand the meaning and values in this message.\n", | ||
"type": "object", | ||
"properties": { | ||
"seq_no": {"type": "integer"}, | ||
"seq_len": {"type": "integer"}, | ||
"buckets": {"type": "array", "items": {"$ref": "ResourceBucket.json"}} | ||
}, | ||
"required": [ | ||
"seq_no", | ||
"seq_len", | ||
"buckets" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"copyright": [ | ||
"Copyright (C) 2019-2021 Swift Navigation Inc.", | ||
"Contact: https://support.swiftnav.com", | ||
"", | ||
"This source is subject to the license found in the file 'LICENSE' which must", | ||
"be be distributed together with this source. All other rights reserved.", | ||
"", | ||
"THIS CODE AND INFORMATION IS PROVIDED 'AS IS' WITHOUT WARRANTY OF ANY KIND,", | ||
"EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED", | ||
"WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE." | ||
], | ||
"$schema": "http://json-schema.org/draft-06/schema#", | ||
"$id": "#MsgProfilingSystemInfo", | ||
"title":"MsgProfilingSystemInfo", | ||
"description":"Contains basic information about system resource usage. System is defined in terms of the source of this message and may vary from sender to sender. Refer to product documentation to understand the exact scope and meaning of this message.\n", | ||
"type": "object", | ||
"properties": { | ||
"total_cpu_time": {"type": "integer"}, | ||
"age": {"type": "integer"}, | ||
"n_threads": {"type": "integer"}, | ||
"heap_usage": {"type": "integer"} | ||
}, | ||
"required": [ | ||
"total_cpu_time", | ||
"age", | ||
"n_threads", | ||
"heap_usage" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"copyright": [ | ||
"Copyright (C) 2019-2021 Swift Navigation Inc.", | ||
"Contact: https://support.swiftnav.com", | ||
"", | ||
"This source is subject to the license found in the file 'LICENSE' which must", | ||
"be be distributed together with this source. All other rights reserved.", | ||
"", | ||
"THIS CODE AND INFORMATION IS PROVIDED 'AS IS' WITHOUT WARRANTY OF ANY KIND,", | ||
"EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED", | ||
"WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE." | ||
], | ||
"$schema": "http://json-schema.org/draft-06/schema#", | ||
"$id": "#MsgProfilingThreadInfo", | ||
"title":"MsgProfilingThreadInfo", | ||
"description":"Contains profiling information related to a single thread being tracked by the producing system. Refer to product documentation to understand the exact scope and meaning of this message.\n", | ||
"type": "object", | ||
"properties": { | ||
"total_cpu_time": {"type": "integer"}, | ||
"age": {"type": "integer"}, | ||
"state": {"type": "integer"}, | ||
"stack_size": {"type": "integer"}, | ||
"stack_usage": {"type": "integer"}, | ||
"name": {"type": "string"} | ||
}, | ||
"required": [ | ||
"total_cpu_time", | ||
"age", | ||
"state", | ||
"stack_size", | ||
"stack_usage", | ||
"name" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"copyright": [ | ||
"Copyright (C) 2019-2021 Swift Navigation Inc.", | ||
"Contact: https://support.swiftnav.com", | ||
"", | ||
"This source is subject to the license found in the file 'LICENSE' which must", | ||
"be be distributed together with this source. All other rights reserved.", | ||
"", | ||
"THIS CODE AND INFORMATION IS PROVIDED 'AS IS' WITHOUT WARRANTY OF ANY KIND,", | ||
"EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED", | ||
"WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE." | ||
], | ||
"$schema": "http://json-schema.org/draft-06/schema#", | ||
"$id": "#ResourceBucket", | ||
"title":"ResourceBucket", | ||
"description":"Information about allocation of various resources grouped by buckets. Refer to product documentation to understand the meaning and values in this message.\n", | ||
"type": "object", | ||
"properties": { | ||
"name": {"type": "string"}, | ||
"thread": {"type": "integer"}, | ||
"mutex": {"type": "integer"}, | ||
"cv": {"type": "integer"}, | ||
"io": {"type": "integer"}, | ||
"heap_bytes_alloc": {"type": "integer"}, | ||
"heap_bytes_free": {"type": "integer"}, | ||
"io_write": {"type": "integer"}, | ||
"io_read": {"type": "integer"} | ||
}, | ||
"required": [ | ||
"name", | ||
"thread", | ||
"mutex", | ||
"cv", | ||
"io", | ||
"heap_bytes_alloc", | ||
"heap_bytes_free", | ||
"io_write", | ||
"io_read" | ||
] | ||
} |
Oops, something went wrong.