lib: Expand ostree static-delta show to show part stats
Now we display stats on the individual parts, such as the blob size and the number of each type of opcode. Most interesting to me is things like how many bsdiff opcodes there are vs new objects, etc.
This commit is contained in:
1 parent
56fc249d08
commit
0481389afd
3 files changed
+186
-21
No files matched your search
@@ -109,6 +109,17 @@ typedef enum {
|
||||
OSTREE_STATIC_DELTA_OPEN_FLAGS_VARIANT_TRUSTED = (1 << 1)
|
||||
} OstreeStaticDeltaOpenFlags;
|
||||
|
||||
typedef enum {
|
||||
OSTREE_STATIC_DELTA_OP_OPEN_SPLICE_AND_CLOSE = 'S',
|
||||
OSTREE_STATIC_DELTA_OP_OPEN = 'o',
|
||||
OSTREE_STATIC_DELTA_OP_WRITE = 'w',
|
||||
OSTREE_STATIC_DELTA_OP_SET_READ_SOURCE = 'r',
|
||||
OSTREE_STATIC_DELTA_OP_UNSET_READ_SOURCE = 'R',
|
||||
OSTREE_STATIC_DELTA_OP_CLOSE = 'c',
|
||||
OSTREE_STATIC_DELTA_OP_BSPATCH = 'B'
|
||||
} OstreeStaticDeltaOpCode;
|
||||
#define OSTREE_STATIC_DELTA_N_OPS 7
|
||||
|
||||
gboolean
|
||||
_ostree_static_delta_part_open (GInputStream *part_in,
|
||||
GBytes *inline_part_bytes,
|
||||
@@ -123,10 +134,16 @@ gboolean _ostree_static_delta_dump (OstreeRepo *repo,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
typedef struct {
|
||||
guint n_ops_executed[OSTREE_STATIC_DELTA_N_OPS];
|
||||
} OstreeDeltaExecuteStats;
|
||||
|
||||
gboolean _ostree_static_delta_part_execute (OstreeRepo *repo,
|
||||
GVariant *header,
|
||||
GVariant *part_payload,
|
||||
gboolean trusted,
|
||||
gboolean stats_only,
|
||||
OstreeDeltaExecuteStats *stats,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
@@ -142,16 +159,6 @@ gboolean _ostree_static_delta_part_execute_finish (OstreeRepo *repo,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
typedef enum {
|
||||
OSTREE_STATIC_DELTA_OP_OPEN_SPLICE_AND_CLOSE = 'S',
|
||||
OSTREE_STATIC_DELTA_OP_OPEN = 'o',
|
||||
OSTREE_STATIC_DELTA_OP_WRITE = 'w',
|
||||
OSTREE_STATIC_DELTA_OP_SET_READ_SOURCE = 'r',
|
||||
OSTREE_STATIC_DELTA_OP_UNSET_READ_SOURCE = 'R',
|
||||
OSTREE_STATIC_DELTA_OP_CLOSE = 'c',
|
||||
OSTREE_STATIC_DELTA_OP_BSPATCH = 'B'
|
||||
} OstreeStaticDeltaOpCode;
|
||||
|
||||
gboolean
|
||||
_ostree_static_delta_parse_checksum_array (GVariant *array,
|
||||
guint8 **out_checksums_array,
|
||||
|
||||
Reference in new issue
Block a user