GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/ingestion/task_hash.cc
Date: 2025-10-12 02:35:38
Exec Total Coverage
Lines: 14 14 100.0%
Branches: 4 5 80.0%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 */
4
5
6 #include "task_hash.h"
7
8 #include <cstdlib>
9
10 #include "crypto/hash.h"
11 #include "util/exception.h"
12
13
14 13219637 void TaskHash::Process(BlockItem *input_block) {
15 13219637 ChunkItem *chunk = input_block->chunk_item();
16
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 13215626 times.
13215626 assert(chunk != NULL);
17
18
3/3
✓ Branch 1 taken 8092417 times.
✓ Branch 2 taken 5230393 times.
✓ Branch 3 taken 26061 times.
13215626 switch (input_block->type()) {
19 8092417 case BlockItem::kBlockData:
20 8092417 shash::Update(input_block->data(), input_block->size(),
21 chunk->hash_ctx());
22 8101279 break;
23 5230393 case BlockItem::kBlockStop:
24 5230393 shash::Final(chunk->hash_ctx(), chunk->hash_ptr());
25 5249356 break;
26 26061 default:
27 26061 PANIC(NULL);
28 }
29
30 13350635 tubes_out_->Dispatch(input_block);
31 13251536 }
32