Add benchmark for saved state performance
- Introduced `benchmark_saved_state.gd` to evaluate the performance of the saved state restoration process. - Implemented JSON integer restoration to handle large integers accurately. - Added command-line argument parsing for specifying the path to the diagnostic JSON file and optional delta seconds. - Conducted performance tests at different speeds and logged the elapsed time for six consecutive steps. - Created a new UID file for the benchmark script.
This commit is contained in:
+10
-10
@@ -1,15 +1,16 @@
|
||||
class_name CSVLoader
|
||||
|
||||
const SPLITTER = '|'
|
||||
|
||||
static func load(csv_text: String) -> Array[Dictionary]:
|
||||
var rows: Array[Dictionary] = []
|
||||
static func load(csv_text: String) -> Dictionary:
|
||||
var result: Dictionary = {}
|
||||
|
||||
var lines := csv_text.strip_edges().split("\n")
|
||||
|
||||
if lines.size() < 2:
|
||||
return rows
|
||||
return result
|
||||
|
||||
var headers := lines[0].split(",")
|
||||
var headers := lines[0].split(SPLITTER)
|
||||
|
||||
for i in range(1, lines.size()):
|
||||
var line := lines[i].strip_edges()
|
||||
@@ -17,7 +18,7 @@ static func load(csv_text: String) -> Array[Dictionary]:
|
||||
if line.is_empty():
|
||||
continue
|
||||
|
||||
var values := line.split(",")
|
||||
var values := line.split(SPLITTER)
|
||||
|
||||
if values.size() != headers.size():
|
||||
push_warning(
|
||||
@@ -26,11 +27,10 @@ static func load(csv_text: String) -> Array[Dictionary]:
|
||||
)
|
||||
continue
|
||||
|
||||
var row: Dictionary = {}
|
||||
var elem: Dictionary = {}
|
||||
|
||||
for j in range(headers.size()):
|
||||
row[headers[j].strip_edges()] = values[j].strip_edges()
|
||||
elem[headers[j].strip_edges()] = values[j].strip_edges()
|
||||
|
||||
rows.append(row)
|
||||
print(rows)
|
||||
return rows
|
||||
result[elem[headers[0]]] = elem
|
||||
return result
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class_name OwniverseTemplates
|
||||
class_name OwniverseTemplate
|
||||
|
||||
#region RU
|
||||
const RU := """
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="keep"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="skip"
|
||||
Reference in New Issue
Block a user