Logo Khaganat
Traductions de cette page?:

Cette page n'est pas tagué correctement.

Patch gen

Fonction

Générer les patch (delta) entre chaque version publié afin que les joueurs ne récupère que la différence entre leur version et la version cible.

Options

patch_gen --help
Usage: patch_gen [-h][-v][-j<jobs>] <CommandLine...>
 
Generate patch
 
Where options are:
  -h or --help : Display this help
  -v or --version : Display version of this program
  -j <jobs> or --jobs <jobs> : Specifies the number of jobs (commands) to run simultaneously
  CommandLine : command line (For a list of valid commands and their paramaters try help)
Usage: patch_gen [-h][-v][-j<jobs>] <CommandLine...>
patch_gen help
INF fb959740 patch_gen : Executing command : 'help'
INF fb959740 patch_gen : Help commands:
INF fb959740 patch_gen : - help all
INF fb959740 patch_gen : - help commands
INF fb959740 patch_gen : - help nel
INF fb959740 patch_gen : - help <wildcard>
INF fb959740 patch_gen : - help <command name>
patch_gen help commands
INF 0942a740 patch_gen : Executing command : 'help commands'
INF 0942a740 patch_gen : Displaying commands and variables from category: commands
INF 0942a740 patch_gen :  0 createNewProduct: create a new package description file
INF 0942a740 patch_gen :  1 go             : perform a 'createNewProduct' if required and 'updateProduct' on patch_test/test0/test_package.xml
INF 0942a740 patch_gen :  2 updateProduct  : process a package

Command

createNewProduct

Création du nouveau package (squelette, configure le fichier xml)

updateProduct

Génération du package (génère les patchs / delta avec l'ancienne version)

go

Fonction de test

Usage

patch_gen createNewProduct patch_game/ryzom.xml
patch_gen updateProduct patch_game/ryzom.xml

Multi-thread

Info

Dans la commande 'updateProduct', nous avons la possibilité d'utiliser plusieurs thread pour effectuer les taches relativement longue.

Exemple : on lance ici 12 threads

patch_gen --jobs=12 updateProduct patch_game/ryzom.xml

Statistique

Réalisé sur une machine ayant 12 cpu.

Nombre de thread Temps (s) Temps %
1 874 14 min 34 100
2 458 7 min 38 52,40
3 319 5 min 19 36,50
4 249 4 min 9 28,49
5 209 3 min 29 23,91
6 180 3 min 0 20,59
7 174 2 min 54 19,91
8 194 3 min 14 22,20
9 192 3 min 12 21,97
10 198 3 min 18 22,65
11 197 3 min 17 22,54
12 201 3 min 21 23,00

1er constat, le bon paramètre pour le nombre de thread ne dépend pas uniquement du nombre de CPU. Il s'agit d'un mixte entre CPU, I&O et mémoire.

Sources

Localisation

Fichiers Fonction
ryzom/tools/patch_gen/patch_gen_main.cpp programme principal - récupère les arguments
ryzom/tools/patch_gen/patch_gen_main.h entête du programme principal
ryzom/tools/patch_gen/patch_gen_common.cpp réalise toutes les opérations
ryzom/tools/patch_gen/patch_gen_common.h entête sur les opérations

Class

Nom de la class fonction
CTaskPackageDescription Exécution d'un thread (exécuté dans updateProduct / generatePatches)
CPackageDescription Class principale, effectue toutes les opérations (sauf la partie generatePatches - il configure et lance les thread)
CC Attribution-Share Alike 4.0 International Driven by DokuWiki
fr/patch_gen.txt · Dernière modification : 2021/12/03 19:19 de 127.0.0.1

Licences Mentions légales Accueil du site Contact