コード例 #1
0
ファイル: clutter-profile.c プロジェクト: gramozeka/GSB-NEW
static void
print_counter (UProfCounterResult *counter,
               gpointer            data)
{
  ClutterUProfReportState  *state = data;
  gulong count = uprof_counter_result_get_count (counter);
  if (count == 0)
    return;

  g_print (" %-*s %-5ld %-5ld\n", REPORT_COLUMN0_WIDTH - 2,
           uprof_counter_result_get_name (counter),
           uprof_counter_result_get_count (counter),
           uprof_counter_result_get_count (counter) / state->n_frames);
}
コード例 #2
0
ファイル: custom-attributes.c プロジェクト: ebassi/UProf
static char *
tripple_count_cb (UProfReport *report,
                  UProfCounterResult *counter,
                  void *user_data)
{
  int count = uprof_counter_result_get_count (counter);
  return g_strdup_printf ("trippled it's\n»»%d««", count * 3);
}
コード例 #3
0
static char *
counter_per_frame_cb (UProfReport *report,
                      UProfCounterResult *counter,
                      void *user_data)
{
  ClutterUProfReportState *state = user_data;
  int n_frames = state->n_frames ? state->n_frames : 1;

  return g_strdup_printf ("%-5ld",
                          uprof_counter_result_get_count (counter) /
                          n_frames);
}