メインコンテンツまでスキップ

メタデータを管理する

Last updated on October 23, 2024

Overview

Across AccelByte Development Toolkit (ADT), files we add to a game build are called metadata files. ADT has two predefined types of metadata that you can use for your build or version:

  • Performance test
  • Sniff test

Performance test metadata

If you specify performance testas the type for the metadata, the file that you upload should follow this schema.

{"@encoding": "blackbox/performancetest+json.v1.0.1"}
---
{"map":"<map_name>","location":"<location_name>","frame_no":<frame number>,"total_run_time":<elapsed time>,"frame_time":<frame time in ms>,"game_time":<game time in ms>,"gpu_time":<game time in ms>,"draw_time":<draw time in ms>,"fps":<f ,"physical_memory_usage":<memory usage>,"actor_location":{"x":<x position>,"y":<y position>,"z":<z position>},"actor_rotation":{"pitch":<pitch rotation>,"yaw":<yaw rotation>,"roll":<roll rotation>}}

Here is an example, showing the variable.

{"@encoding": "blackbox/performancetest+json.v1.0.1"}
---

{"map":"Level_Basement","location":"GruntIntro_Start","frame_no":1,"total_run_time":9.1677160263061523,"frame_time":916.7716064453125,"game_time":24.550630569458008,"gpu_time":794.19097900390625,"draw_time":0.092030003666877747,"fps":1.0907841920852661,"physical_memory_usage":12586881024,"actor_location":{"x":-4990,"y":-2390,"z":91.251724243164063},"actor_rotation":{"pitch":0,"yaw":0,"roll":0}}
{"map":"Level_Basement","location":"GruntIntro_Start","frame_no":2,"total_run_time":11.704431533813477,"frame_time":1078.765869140625,"game_time":48.986068725585938,"gpu_time":1041.8829345703125,"draw_time":0.21141700446605682,"fps":0.92698520421981812,"physical_memory_usage":12632846336,"actor_location":{"x":-4990,"y":-2390,"z":91.251724243164063},"actor_rotation":{"pitch":0,"yaw":0,"roll":0}}
{"map":"Level_Basement","location":"GruntIntro_Start","frame_no":3,"total_run_time":12.625339508056641,"frame_time":1062.9801025390625,"game_time":54.457942962646484,"gpu_time":1264.8056640625,"draw_time":0.31886529922485352,"fps":0.94075137376785278,"physical_memory_usage":12636585984,"actor_location":{"x":-4990,"y":-2390,"z":91.251724243164063},"actor_rotation":{"pitch":0,"yaw":0,"roll":0}}

Sniff test metadata

If you specify snifftestas the metadata type, the file you upload should follow this schema.

{"@encoding": "blackbox/snifftest+json.v2.1.0", "test_id": "<test id in UUID>", "map": "<map>"}
---
{"test_id": "<test id in UUID>", "type":"begin_test", "name":"<testname>"}
{"test_id": "<test id in UUID>", "type": "msg", "msg_type": "error", "msg": "<msg>", "callstack": "<callstack>", "timestamp": "<timestamp>"}
{"test_id": "<test id in UUID>", "type": "msg", "msg_type": "warning", "msg": "<msg>", "callstack": "<callstack>", "timestamp": "<timestamp>"}
{"test_id": "<test id in UUID>", "type": "msg", "msg_type":"info", "msg": "<msg>", "callstack": "<callstack>", "timestamp": "<timestamp>"}
{"test_id": "<test id in UUID>", "type":"end_test", "name":"<testname>", "result":"<result>"}
...
---
{test_id : "<test id in UUID>", "map": "<map>", total_test : <total test count>, failed : <total failed testt>, success : <total success test>, "result":"<result>"}

Here is an example, showing the variable.

{"@encoding": "blackbox/snifftest+json.v2.1.0", "test_id": "fc341e58-9a5a-48e6-9ffc-c3b398f935e5", map: "Level_1"}
---
{"test_id": "fc341e58-9a5a-48e6-9ffc-c3b398f935e5", "type":"begin_test","name":"LoadMap-Level_1"}
{"test_id": "fc341e58-9a5a-48e6-9ffc-c3b398f935e5", "type":"msg","msg_type":"error","msg":"RegisterLocationMarkersForBodyPartCaps has been called", "callstack":""C:\\Dev\\Project\\Source\\Project\\Private\\Automation\\Something.cpp (830)", "timestamp":1612416088}
{"test_id": "fc341e58-9a5a-48e6-9ffc-c3b398f935e5", "type":"msg","msg_type":"warning","msg":"GetVertexLocations returned false for mesh HeadStump.", "callstack":""C:\\Dev\\Project\\Source\\Project\\Private\\Automation\\Something.cpp (830)", "timestamp":1612416188}
{"test_id": "fc341e58-9a5a-48e6-9ffc-c3b398f935e5", "type":"msg","msg_type":"info","msg":"GetVertexLocations returned false for mesh HeadStump.", "callstack":""C:\\Dev\\Project\\Source\\Project\\Private\\Automation\\Something.cpp (830)", "timestamp":1612416288}
{"test_id": "fc341e58-9a5a-48e6-9ffc-c3b398f935e5", "type":"end_test","name":"Flashlight-PlayerStart","result":"success"}
---
{"test_id" : "fc341e58-9a5a-48e6-9ffc-c3b398f935e5", map: "Level_1", total_test : 2, failed : 1, success : 1, result : "failed"}

Upload metadata files

You can upload metadata files into the ADT Backend. They serve as additional information for a particular build.

To upload a metadata file, use the command below:

Without inline configuration

BlackBoxCLI.exe build upload-metadata --type <metadata type> --file <metadata file path>

With inline configuration

BlackBoxCLI.exe build upload-metadata --type <metadata type> --file <metadata file path> --namespace <your namespace> --apikey asdf1234

Example:

BlackBoxCLI.exe build upload-metadata --type smokeTest --file D:\mygamelogs\smokeTestResult.log

Override target IDs

To override the target IDs, add --version-id and --build-id to the build upload-metadata command. For example:

BlackBoxCLI.exe build upload-metadata --type smokeTest --file D:\mygamelogs\smokeTestResult.log --version-id asdf1234 --build-id asdf1234

These subcommands help you upload metadata.

Main CommandSub CommandOptions and Parameters
NameDescription
buildupload-metadata-d, --directoryDirectory of the data to be uploaded
-f, --fileFile to be uploaded
-t, --typeMetadata type
-n, --namespaceNamespace
-a, --apikeyAPI Key
-p, --game-projectGame project path
-F, --force-parseForce parsing header and footer
-N,--version-nameOverride version using the name of the version (optional)
-V,--version-id
-b,--build-idOverride build id to be used (optional)

Add metadata to a build using --key and --value

To add metadata to a build, use the --key and --value commands.

Without inline configuration

BlackBoxCLI.exe build add-metadata --key<metadata key> --value <metadata value>

With inline configuration

BlackBoxCLI.exe build add-metadata --key <metadata key> --value <metadata value> --namespace <your namespace> --apikey asdf1234

Example:

BlackBoxCLI.exe build add-metadata --key build-name --value "myawesomebuild"

Use these subcommands to add metadata to a build:

Main CommandSub CommandOptions and Parameters
NameDescription
`build``upload-metadata``-d, --directory`Directory of the data to be uploaded
備考

You can override the version-id, version-name or build-id the same way you did for the target id when you uploaded the metadata file to ADT.

備考

The system uses the build-name metadata key to set the name of a build. When you run the build register command and then the build add-metadata --key build-name ... command, it has the same effect as calling build find-or-register.