mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 14:54:53 -04:00
9c631e11fe
This solves two main problems: - the looming threat of running out of memory since every thread would consume duplicate (and probably not needed) resources - though I will point out, jak 2's offline tests seem to hardly use any memory even with 400+ files, duplicated across many threads. Where as jak 1 does indeed use tons more memory. So I think there is something going on besides just the source files - condense the output so it's much easier to see what is happening / how close the test is to completing. - one annoying thing about the multiple thread change was errors were typically buried far in the middle of the output, this fixes that - refactors the offline test code in general to be a lot more modular The pretty printing is not enabled by default, run with `-p` or `--pretty-print` if you want to use it https://user-images.githubusercontent.com/13153231/205513212-a65c20d4-ce36-44f6-826a-cd475505dbf9.mp4
37 lines
1.3 KiB
C++
37 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "common/util/FileUtil.h"
|
|
|
|
struct OfflineTestSourceFile {
|
|
OfflineTestSourceFile(fs::path _path,
|
|
std::string _containing_dgo,
|
|
std::string _name_in_dgo,
|
|
std::string _unique_name)
|
|
: path(_path),
|
|
containing_dgo(_containing_dgo),
|
|
name_in_dgo(_name_in_dgo),
|
|
unique_name(_unique_name){};
|
|
fs::path path;
|
|
std::string containing_dgo;
|
|
std::string name_in_dgo;
|
|
std::string unique_name;
|
|
};
|
|
|
|
struct OfflineTestArtFile {
|
|
OfflineTestArtFile(std::string _containing_dgo,
|
|
std::string _name_in_dgo,
|
|
std::string _unique_name)
|
|
: containing_dgo(_containing_dgo), name_in_dgo(_name_in_dgo), unique_name(_unique_name){};
|
|
std::string containing_dgo;
|
|
std::string name_in_dgo;
|
|
std::string unique_name;
|
|
};
|
|
|
|
std::vector<OfflineTestSourceFile> find_source_files(const std::string& game_name,
|
|
const std::vector<std::string>& dgos,
|
|
const std::string& single_file);
|
|
std::vector<OfflineTestArtFile> find_art_files(const std::string& game_name,
|
|
const std::vector<std::string>& dgos);
|