Hi Daniel,

* Daniel Wagner <[email protected]> [2010-09-16 15:49:34 +0200]:

> From: Daniel Wagner <[email protected]>
> 
> Currently the statistic information is
> stored into the profile file. This
> results in rewriting the whole file
> if connann_stats_save is called. This
> results in too many disk I/Os for low
> power devices.
> 
> Furthermore, only the current value is
> stored. There is no way to find out
> how many bytes have been transfered
> in the last month.
> 
> First, each service statistic is
> stored into a separate files under
> /var/lib/connman having a *.data
> extension. This file contains fixed sized
> records of stats counters and will be mmap
> into memory. It is used like a ring buffer.
> 
> If the buffer is full or after a certain
> period (e.g. a month), the raw data
> will be summerized into the *.info file.
> Currently the summary is not implented
> yet. This will be implemented in the
> next round of patches.
> ---
>  Makefile.am         |    2 +-
>  bootstrap-configure |    6 +-
>  configure.ac        |   11 ++
>  src/connman.h       |   24 +++
>  src/main.c          |    2 +
>  src/service.c       |  131 +++--------------
>  src/stats.c         |  412 
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>  7 files changed, 470 insertions(+), 118 deletions(-)
>  create mode 100644 src/stats.c
> 
> diff --git a/Makefile.am b/Makefile.am
> index 397822e..e146528 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -64,7 +64,7 @@ src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) 
> $(gresolv_sources) \
>                       src/wifi.c src/storage.c src/dbus.c src/config.c \
>                       src/technology.c src/counter.c src/location.c \
>                       src/session.c src/tethering.c src/ondemand.c \
> -                     src/wpad.c
> +                     src/wpad.c src/stats.c
>  
>  if UDEV
>  src_connmand_SOURCES += src/udev.c
> diff --git a/bootstrap-configure b/bootstrap-configure
> index 1045688..9b5237e 100755
> --- a/bootstrap-configure
> +++ b/bootstrap-configure
> @@ -21,15 +21,13 @@ fi
>               --enable-wifi=builtin \
>               --enable-bluetooth=builtin \
>               --enable-ofono=builtin \
> -             --enable-dhclient=builtin \
>               --enable-openconnect=builtin \
>               --enable-dnsproxy=builtin \
>               --enable-google=builtin \
>               --enable-meego=builtin \
>               --enable-portal=builtin \
> -             --enable-iwmx \
>               --enable-iospm \
> -             --enable-polkit=builtin \
>               --enable-capng \
>               --enable-client \
> -             --enable-tools $*
> +             --enable-tools \
> +    --disable-optimization $*

I'm sure that you did not want add these changes to bootstrap-configure
to your patch. ;-)

-- 
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to