File: stats_log.bash

package info (click to toggle)
ccache 4.12.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,188 kB
  • sloc: cpp: 47,282; asm: 28,570; sh: 8,674; ansic: 5,357; python: 685; perl: 68; makefile: 23
file content (39 lines) | stat: -rw-r--r-- 979 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
SUITE_stats_log_SETUP() {
    generate_code 1 test.c
    unset CCACHE_NODIRECT
    export CCACHE_STATSLOG=stats.log
}

SUITE_stats_log() {
    # -------------------------------------------------------------------------
    TEST "CCACHE_STATSLOG"

    $CCACHE_COMPILE -c test.c
    expect_stat direct_cache_hit 0
    expect_stat preprocessed_cache_miss 1
    expect_stat cache_miss 1
    expect_stat local_storage_read_hit 0
    expect_stat local_storage_read_miss 2

    $CCACHE_COMPILE -c test.c
    expect_stat direct_cache_hit 1
    expect_stat preprocessed_cache_miss 1
    expect_stat cache_miss 1
    expect_stat local_storage_read_hit 2
    expect_stat local_storage_read_miss 2

    expect_content stats.log "# test.c
cache_miss
direct_cache_miss
local_storage_miss
local_storage_read_miss
local_storage_read_miss
local_storage_write
local_storage_write
preprocessed_cache_miss
# test.c
direct_cache_hit
local_storage_hit
local_storage_read_hit
local_storage_read_hit"
}