Ignore:
Timestamp:
Dec 6, 2009, 10:21:40 PM (10 years ago)
Author:
Sam Hocevar
Message:

Gather profiling information in caca_refresh_display() and caca_get_event().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/caca_internals.h

    r3905 r4094  
    11/*
    22 *  libcaca       Colour ASCII-Art library
    3  *  Copyright (c) 2002-2006 Sam Hocevar <sam@hocevar.net>
     3 *  Copyright (c) 2002-2009 Sam Hocevar <sam@hocevar.net>
    44 *                All Rights Reserved
    55 *
     
    2525
    2626#if !defined(_DOXYGEN_SKIP_ME)
     27#   define STAT_VALUES 20
    2728#   define EVENTBUF_LEN 10
    2829#   define MAX_DIRTY_COUNT 8
     
    143144{
    144145    int last_sec, last_usec;
     146};
     147
     148/* Statistic structure for profiling */
     149struct caca_stat
     150{
     151    char *name;
     152    int imean, itable[STAT_VALUES];
    145153};
    146154
     
    205213    int delay, rendertime;
    206214    caca_timer_t timer;
     215#if defined PROF
     216    struct caca_stat display_stat, wait_stat;
     217    struct caca_stat ev_sys_stat, ev_wait_stat;
     218#endif
    207219    int lastticks;
    208220
     
    250262extern void _caca_set_term_title(char const *);
    251263
     264/* Profiling functions */
     265#if defined PROF
     266extern void _caca_dump_stats(void);
     267extern void _caca_init_stat(struct caca_stat *, char const *, ...);
     268extern void _caca_fini_stat(struct caca_stat *);
     269#endif
     270
    252271#endif /* __CACA_INTERNALS_H__ */
Note: See TracChangeset for help on using the changeset viewer.