wip: topology on init/find.
This commit is contained in:
parent
de06a87b4d
commit
805c95a9cc
|
@ -20,10 +20,9 @@ test(void)
|
||||||
printf("total: %i online %i\n", cores_count(), cores_online_count());
|
printf("total: %i online %i\n", cores_count(), cores_online_count());
|
||||||
|
|
||||||
cores = cores_find();
|
cores = cores_find();
|
||||||
cores_topology(cores);
|
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
cores_check(cores);
|
cores_update(cores);
|
||||||
EINA_LIST_FOREACH(cores, l, core)
|
EINA_LIST_FOREACH(cores, l, core)
|
||||||
{
|
{
|
||||||
printf("core %i = %1.2f%%\t%1.2fMHz %iC\n", core->id, core->percent,
|
printf("core %i = %1.2f%%\t%1.2fMHz %iC\n", core->id, core->percent,
|
||||||
|
|
|
@ -121,7 +121,7 @@ Eina_List *
|
||||||
cores_find(void);
|
cores_find(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
cores_check(Eina_List *cores);
|
cores_update(Eina_List *cores);
|
||||||
|
|
||||||
int
|
int
|
||||||
cores_count(void);
|
cores_count(void);
|
||||||
|
@ -147,5 +147,4 @@ cores_temperature_min_max(int *min, int *max);
|
||||||
int
|
int
|
||||||
cores_frequency_min_max(int *min, int *max);
|
cores_frequency_min_max(int *min, int *max);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -66,7 +66,7 @@ cores_online_count(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cores_check(Eina_List *cores)
|
cores_update(Eina_List *cores)
|
||||||
{
|
{
|
||||||
int diff_total, diff_idle;
|
int diff_total, diff_idle;
|
||||||
double ratio, percent;
|
double ratio, percent;
|
||||||
|
@ -248,6 +248,7 @@ cores_find(void)
|
||||||
core->id = i;
|
core->id = i;
|
||||||
cores = eina_list_append(cores, core);
|
cores = eina_list_append(cores, core);
|
||||||
}
|
}
|
||||||
|
cores_topology(cores);
|
||||||
return cores;
|
return cores;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue