netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=805c95a9ccb1384be623e3bc507eacc5a3c454df

commit 805c95a9ccb1384be623e3bc507eacc5a3c454df
Author: Alastair Poole <nets...@gmail.com>
Date:   Mon May 17 16:19:44 2021 +0100

    wip: topology on init/find.
---
 src/bin/evisum_watcher.c   | 3 +--
 src/bin/next/machine.h     | 3 +--
 src/bin/next/machine/cpu.x | 3 ++-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/bin/evisum_watcher.c b/src/bin/evisum_watcher.c
index e4c2237..dd11813 100644
--- a/src/bin/evisum_watcher.c
+++ b/src/bin/evisum_watcher.c
@@ -20,10 +20,9 @@ test(void)
    printf("total: %i online %i\n", cores_count(), cores_online_count());
 
    cores = cores_find();
-   cores_topology(cores);
    for (int i = 0; i < 10; i++)
      {
-        cores_check(cores);
+        cores_update(cores);
         EINA_LIST_FOREACH(cores, l, core)
           {
              printf("core %i = %1.2f%%\t%1.2fMHz %iC\n", core->id, 
core->percent,
diff --git a/src/bin/next/machine.h b/src/bin/next/machine.h
index d3871a0..6962787 100644
--- a/src/bin/next/machine.h
+++ b/src/bin/next/machine.h
@@ -121,7 +121,7 @@ Eina_List *
 cores_find(void);
 
 void
-cores_check(Eina_List *cores);
+cores_update(Eina_List *cores);
 
 int
 cores_count(void);
@@ -147,5 +147,4 @@ cores_temperature_min_max(int *min, int *max);
 int
 cores_frequency_min_max(int *min, int *max);
 
-
 #endif
diff --git a/src/bin/next/machine/cpu.x b/src/bin/next/machine/cpu.x
index 9d2d712..2225098 100644
--- a/src/bin/next/machine/cpu.x
+++ b/src/bin/next/machine/cpu.x
@@ -66,7 +66,7 @@ cores_online_count(void)
 }
 
 void
-cores_check(Eina_List *cores)
+cores_update(Eina_List *cores)
 {
    int diff_total, diff_idle;
    double ratio, percent;
@@ -248,6 +248,7 @@ cores_find(void)
         core->id = i;
         cores = eina_list_append(cores, core);
      }
+   cores_topology(cores);
    return cores;
 }
 

-- 


Reply via email to