メタデータの管理
注釈:本資料はAI技術を用いて翻訳されています。
概要
AccelByte Development Toolkit(ADT)では、ゲームビルドに追加するファイルをメタデータファイルと呼びます。ADTには、ビルドまたはバージョンに使用できる2つの定義済みメタデータタイプがあります。
- パフォーマンステスト
- スニフテスト
パフォーマンステストメタデータ
メタデータタイプとしてperformance testを指定する場合、アップロードするファイルは以下のスキーマに従う必要があります。
{"@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>}}
以下は変数を示す例です。
{"@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}}
スニフテストメタデータ
メタデータタイプとしてsnifftestを指定する場合、アップロードするファイルは以下のスキーマに従う必要があります。
{"@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 test>, success : <total success test>, "result":"<result>"}
以下は変数を示す例です。
{"@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"}
メタデータファイルのアップロード
メタデータファイルをADTバックエンドにアップロードできます。これらのファイルは、特定のビルドの追加情報として機能します。
メタデータファイルをアップロードするには、以下のコマンドを使用します。
インライン設定なし
BlackBoxCLI.exe build upload-metadata --type <metadata type> --file <metadata file path>
インライン設定あり
BlackBoxCLI.exe build upload-metadata --type <metadata type> --file <metadata file path> --namespace <your namespace> --apikey asdf1234
例:
BlackBoxCLI.exe build upload-metadata --type smokeTest --file D:\mygamelogs\smokeTestResult.log
ターゲットIDを上書きする
ターゲットIDを上書きするには、build upload-metadataコマンドに--version-idと--build-idを追加します。例:
BlackBoxCLI.exe build upload-metadata --type smokeTest --file D:\mygamelogs\smokeTestResult.log --version-id asdf1234 --build-id asdf1234
これらのサブコマンドは、メタデータのアップロードに役立ちます。
| メインコマンド | サブコマンド | オプションとパラメータ | |
|---|---|---|---|
| 名前 | 説明 | ||
build | upload-metadata | -d, --directory | アップロードするデータのディレクトリ |
-f, --file | アップロードするファイル | ||
-t, --type | メタデータタイプ | ||
-n, --namespace | ネームスペース | ||
-a, --apikey | APIキー | ||
-p, --game-project | ゲームプロジェクトパス | ||
-F, --force-parse | ヘッダーとフッターの強制解析 | ||
-N,--version-name | バージョンの名前を使用してバージョンを上書き(オプション) | ||
-V,--version-id | |||
-b,--build-id | 使用するビルドIDを上書き(オプション) | ||
--keyと--valueを使用したビルドへのメタデータ追加
ビルドにメタデータを追加するには、--keyと--valueオプションを使用します。
インライン設定なし
BlackBoxCLI.exe build add-metadata --key<metadata key> --value <metadata value>
インライン設定あり
BlackBoxCLI.exe build add-metadata --key <metadata key> --value <metadata value> --namespace <your namespace> --apikey asdf1234
例:
BlackBoxCLI.exe build add-metadata --key build-name --value "myawesomebuild"
以下のサブコマンドを使用して、ビルドにメタデータを追加します。
| メインコマンド | サブコマンド | オプションとパラメータ | |
|---|---|---|---|
| 名前 | 説明 | ||
build | upload-metadata | -d, --directory | アップロードするデータのディレクトリ |
メタデータファイルをADTにアップロードしたときにtarget idを上書きしたのと同じ方法で、version-id、version-name、またはbuild-idを上書きできます。
システムは、build-nameメタデータキーを使用してビルドの名前を設定します。build registerコマンドを実行してからbuild add-metadata --key build-name ...コマンドを実行すると、build find-or-registerを呼び出すのと同じ効果があります。