コード例 #1
0
ファイル: goaccess.c プロジェクト: liuzhengyi/goaccess
/* allocate memory for an instance of holder */
static void
allocate_holder (void)
{
#ifdef TCB_BTREE
  TCBDB *ht = NULL;
#elif TCB_MEMHASH
  TCMDB *ht = NULL;
#else
  GHashTable *ht;
#endif

  GModule module;
  GRawData *raw_data;
  int i;
  unsigned int ht_size = 0;

  holder = new_gholder (TOTAL_MODULES);
  for (i = 0; i < TOTAL_MODULES; i++) {
    module = i;

    /* extract data from the corresponding hash table */
    ht = get_ht_by_module (module);
    ht_size = get_ht_size_by_module (module);
    raw_data = parse_raw_data (ht, ht_size, module);
    load_holder_data (raw_data, holder + module, module, module_sort[module]);
  }
}
コード例 #2
0
ファイル: goaccess.c プロジェクト: 0-T-0/goaccess
/* allocate memory for an instance of holder */
static void
allocate_holder (void)
{
  GModule module;

  holder = new_gholder (TOTAL_MODULES);
  for (module = 0; module < TOTAL_MODULES; module++) {
    allocate_holder_by_module (module);
  }
}
コード例 #3
0
ファイル: goaccess.c プロジェクト: kingland/goaccess
/* allocate memory for an instance of holder */
static void
allocate_holder (void)
{
#if defined(TCB_BTREE) || defined(TCB_MEMHASH)
  TCADB *ht = NULL;
#else
  GHashTable *ht;
#endif

  GModule module;
  GRawData *raw_data;
  unsigned int ht_size = 0;

  holder = new_gholder (TOTAL_MODULES);
  for (module = 0; module < TOTAL_MODULES; module++) {
    /* extract data from the corresponding hits hash table */
    ht = get_storage_metric (module, MTRC_HITS);

    ht_size = get_ht_size (ht);
    raw_data = parse_raw_data (ht, ht_size, module);
    load_holder_data (raw_data, holder + module, module, module_sort[module]);
  }
}