ia64/xen-unstable

changeset 14789:4add9eb83f7f

Added documentation, C bindings, and a test for VM_metrics.{start_time,
VCPUs_CPU,VCPUs_params}.

Changed VM_metrics.start_time to be a DateTime, not an integer.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Mon Apr 09 17:09:21 2007 +0100 (2007-04-09)
parents 3565e4883548
children 28efbe0ea490
files docs/xen-api/xenapi-datamodel.tex tools/libxen/include/xen_int_int_map.h tools/libxen/include/xen_internal.h tools/libxen/include/xen_vm_metrics.h tools/libxen/src/xen_common.c tools/libxen/src/xen_int_int_map.c tools/libxen/src/xen_vm_metrics.c tools/libxen/test/test_bindings.c tools/python/xen/xend/XendAPI.py tools/python/xen/xend/XendVMMetrics.py tools/python/xen/xm/main.py
line diff
     1.1 --- a/docs/xen-api/xenapi-datamodel.tex	Mon Apr 09 12:20:35 2007 +0100
     1.2 +++ b/docs/xen-api/xenapi-datamodel.tex	Mon Apr 09 17:09:21 2007 +0100
     1.3 @@ -4107,6 +4107,9 @@ Quals & Field & Type & Description \\
     1.4  $\mathit{RO}_\mathit{run}$ &  {\tt memory/actual} & int & Guest's actual memory (bytes) \\
     1.5  $\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/number} & int & Current number of VCPUs \\
     1.6  $\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/utilisation} & (int $\rightarrow$ float) Map & Utilisation for all of guest's current VCPUs \\
     1.7 +$\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/CPU} & (int $\rightarrow$ int) Map & VCPU to PCPU map \\
     1.8 +$\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/params} & (string $\rightarrow$ string) Map & The live equivalent to VM.VCPUs\_params \\
     1.9 +$\mathit{RO}_\mathit{run}$ &  {\tt start\_time} & datetime & Time at which this VM was last booted \\
    1.10  $\mathit{RO}_\mathit{run}$ &  {\tt last\_updated} & datetime & Time at which this information was last updated \\
    1.11  \hline
    1.12  \end{longtable}
    1.13 @@ -4260,6 +4263,102 @@ value of the field
    1.14  \vspace{0.3cm}
    1.15  \vspace{0.3cm}
    1.16  \vspace{0.3cm}
    1.17 +\subsubsection{RPC name:~get\_VCPUs\_CPU}
    1.18 +
    1.19 +{\bf Overview:} 
    1.20 +Get the VCPUs/CPU field of the given VM\_metrics.
    1.21 +
    1.22 + \noindent {\bf Signature:} 
    1.23 +\begin{verbatim} ((int -> int) Map) get_VCPUs_CPU (session_id s, VM_metrics ref self)\end{verbatim}
    1.24 +
    1.25 +
    1.26 +\noindent{\bf Arguments:}
    1.27 +
    1.28 + 
    1.29 +\vspace{0.3cm}
    1.30 +\begin{tabular}{|c|c|p{7cm}|}
    1.31 + \hline
    1.32 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.33 +{\tt VM\_metrics ref } & self & reference to the object \\ \hline 
    1.34 +
    1.35 +\end{tabular}
    1.36 +
    1.37 +\vspace{0.3cm}
    1.38 +
    1.39 + \noindent {\bf Return Type:} 
    1.40 +{\tt 
    1.41 +(int $\rightarrow$ int) Map
    1.42 +}
    1.43 +
    1.44 +
    1.45 +value of the field
    1.46 +\vspace{0.3cm}
    1.47 +\vspace{0.3cm}
    1.48 +\vspace{0.3cm}
    1.49 +\subsubsection{RPC name:~get\_VCPUs\_params}
    1.50 +
    1.51 +{\bf Overview:} 
    1.52 +Get the VCPUs/params field of the given VM\_metrics.
    1.53 +
    1.54 + \noindent {\bf Signature:} 
    1.55 +\begin{verbatim} ((string -> string) Map) get_VCPUs_params (session_id s, VM_metrics ref self)\end{verbatim}
    1.56 +
    1.57 +
    1.58 +\noindent{\bf Arguments:}
    1.59 +
    1.60 + 
    1.61 +\vspace{0.3cm}
    1.62 +\begin{tabular}{|c|c|p{7cm}|}
    1.63 + \hline
    1.64 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.65 +{\tt VM\_metrics ref } & self & reference to the object \\ \hline 
    1.66 +
    1.67 +\end{tabular}
    1.68 +
    1.69 +\vspace{0.3cm}
    1.70 +
    1.71 + \noindent {\bf Return Type:} 
    1.72 +{\tt 
    1.73 +(string $\rightarrow$ string) Map
    1.74 +}
    1.75 +
    1.76 +
    1.77 +value of the field
    1.78 +\vspace{0.3cm}
    1.79 +\vspace{0.3cm}
    1.80 +\vspace{0.3cm}
    1.81 +\subsubsection{RPC name:~get\_start\_time}
    1.82 +
    1.83 +{\bf Overview:} 
    1.84 +Get the start\_time field of the given VM\_metrics.
    1.85 +
    1.86 + \noindent {\bf Signature:} 
    1.87 +\begin{verbatim} datetime get_start_time (session_id s, VM_metrics ref self)\end{verbatim}
    1.88 +
    1.89 +
    1.90 +\noindent{\bf Arguments:}
    1.91 +
    1.92 + 
    1.93 +\vspace{0.3cm}
    1.94 +\begin{tabular}{|c|c|p{7cm}|}
    1.95 + \hline
    1.96 +{\bf type} & {\bf name} & {\bf description} \\ \hline
    1.97 +{\tt VM\_metrics ref } & self & reference to the object \\ \hline 
    1.98 +
    1.99 +\end{tabular}
   1.100 +
   1.101 +\vspace{0.3cm}
   1.102 +
   1.103 + \noindent {\bf Return Type:} 
   1.104 +{\tt 
   1.105 +datetime
   1.106 +}
   1.107 +
   1.108 +
   1.109 +value of the field
   1.110 +\vspace{0.3cm}
   1.111 +\vspace{0.3cm}
   1.112 +\vspace{0.3cm}
   1.113  \subsubsection{RPC name:~get\_last\_updated}
   1.114  
   1.115  {\bf Overview:} 
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/libxen/include/xen_int_int_map.h	Mon Apr 09 17:09:21 2007 +0100
     2.3 @@ -0,0 +1,53 @@
     2.4 +/*
     2.5 + * Copyright (c) 2006-2007, XenSource Inc.
     2.6 + *
     2.7 + * This library is free software; you can redistribute it and/or
     2.8 + * modify it under the terms of the GNU Lesser General Public
     2.9 + * License as published by the Free Software Foundation; either
    2.10 + * version 2.1 of the License, or (at your option) any later version.
    2.11 + *
    2.12 + * This library is distributed in the hope that it will be useful,
    2.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    2.15 + * Lesser General Public License for more details.
    2.16 + *
    2.17 + * You should have received a copy of the GNU Lesser General Public
    2.18 + * License along with this library; if not, write to the Free Software
    2.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
    2.20 + */
    2.21 +
    2.22 +#ifndef XEN_INT_INT_MAP_H
    2.23 +#define XEN_INT_INT_MAP_H
    2.24 +
    2.25 +
    2.26 +#include "xen_common.h"
    2.27 +
    2.28 +
    2.29 +typedef struct xen_int_int_map_contents
    2.30 +{
    2.31 +  int64_t key;
    2.32 +  int64_t val;
    2.33 +} xen_int_int_map_contents;
    2.34 +
    2.35 +
    2.36 +typedef struct xen_int_int_map
    2.37 +{
    2.38 +    size_t size;
    2.39 +    xen_int_int_map_contents contents[];
    2.40 +} xen_int_int_map;
    2.41 +
    2.42 +/**
    2.43 + * Allocate a xen_int_int_map of the given size.
    2.44 + */
    2.45 +extern xen_int_int_map *
    2.46 +xen_int_int_map_alloc(size_t size);
    2.47 +
    2.48 +/**
    2.49 + * Free the given xen_int_int_map, and all referenced values.  The
    2.50 + * given map must have been allocated by this library.
    2.51 + */
    2.52 +extern void
    2.53 +xen_int_int_map_free(xen_int_int_map *map);
    2.54 +
    2.55 +
    2.56 +#endif
     3.1 --- a/tools/libxen/include/xen_internal.h	Mon Apr 09 12:20:35 2007 +0100
     3.2 +++ b/tools/libxen/include/xen_internal.h	Mon Apr 09 17:09:21 2007 +0100
     3.3 @@ -86,6 +86,7 @@ extern const abstract_type abstract_type
     3.4  
     3.5  extern const abstract_type abstract_type_string_string_map;
     3.6  extern const abstract_type abstract_type_int_float_map;
     3.7 +extern const abstract_type abstract_type_int_int_map;
     3.8  
     3.9  
    3.10  typedef struct abstract_value
     4.1 --- a/tools/libxen/include/xen_vm_metrics.h	Mon Apr 09 12:20:35 2007 +0100
     4.2 +++ b/tools/libxen/include/xen_vm_metrics.h	Mon Apr 09 17:09:21 2007 +0100
     4.3 @@ -21,6 +21,8 @@
     4.4  
     4.5  #include "xen_common.h"
     4.6  #include "xen_int_float_map.h"
     4.7 +#include "xen_int_int_map.h"
     4.8 +#include "xen_string_string_map.h"
     4.9  #include "xen_vm_metrics_decl.h"
    4.10  
    4.11  
    4.12 @@ -66,6 +68,9 @@ typedef struct xen_vm_metrics_record
    4.13      int64_t memory_actual;
    4.14      int64_t vcpus_number;
    4.15      xen_int_float_map *vcpus_utilisation;
    4.16 +    xen_int_int_map *vcpus_cpu;
    4.17 +    xen_string_string_map *vcpus_params;
    4.18 +    time_t start_time;
    4.19      time_t last_updated;
    4.20  } xen_vm_metrics_record;
    4.21  
    4.22 @@ -191,6 +196,27 @@ xen_vm_metrics_get_vcpus_utilisation(xen
    4.23  
    4.24  
    4.25  /**
    4.26 + * Get the VCPUs/CPU field of the given VM_metrics.
    4.27 + */
    4.28 +extern bool
    4.29 +xen_vm_metrics_get_vcpus_cpu(xen_session *session, xen_int_int_map **result, xen_vm_metrics vm_metrics);
    4.30 +
    4.31 +
    4.32 +/**
    4.33 + * Get the VCPUs/params field of the given VM_metrics.
    4.34 + */
    4.35 +extern bool
    4.36 +xen_vm_metrics_get_vcpus_params(xen_session *session, xen_string_string_map **result, xen_vm_metrics vm_metrics);
    4.37 +
    4.38 +
    4.39 +/**
    4.40 + * Get the start_time field of the given VM_metrics.
    4.41 + */
    4.42 +extern bool
    4.43 +xen_vm_metrics_get_start_time(xen_session *session, time_t *result, xen_vm_metrics vm_metrics);
    4.44 +
    4.45 +
    4.46 +/**
    4.47   * Get the last_updated field of the given VM_metrics.
    4.48   */
    4.49  extern bool
     5.1 --- a/tools/libxen/src/xen_common.c	Mon Apr 09 12:20:35 2007 +0100
     5.2 +++ b/tools/libxen/src/xen_common.c	Mon Apr 09 17:09:21 2007 +0100
     5.3 @@ -35,6 +35,7 @@
     5.4  #include "xen_host.h"
     5.5  #include "xen_internal.h"
     5.6  #include "xen_int_float_map.h"
     5.7 +#include "xen_int_int_map.h"
     5.8  #include "xen_string_string_map.h"
     5.9  
    5.10  
    5.11 @@ -1697,3 +1698,21 @@ const abstract_type abstract_type_int_fl
    5.12          .struct_size = sizeof(xen_int_float_map_contents),
    5.13          .members = int_float_members
    5.14      };
    5.15 +
    5.16 +static struct struct_member int_int_members[] =
    5.17 +{
    5.18 +    {
    5.19 +        .type = &abstract_type_int,
    5.20 +        .offset = offsetof(xen_int_int_map_contents, key)
    5.21 +    },
    5.22 +    {
    5.23 +        .type = &abstract_type_int,
    5.24 +        .offset = offsetof(xen_int_int_map_contents, val)
    5.25 +    }
    5.26 +};
    5.27 +const abstract_type abstract_type_int_int_map =
    5.28 +    {
    5.29 +        .typename = MAP,
    5.30 +        .struct_size = sizeof(xen_int_int_map_contents),
    5.31 +        .members = int_int_members
    5.32 +    };
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/tools/libxen/src/xen_int_int_map.c	Mon Apr 09 17:09:21 2007 +0100
     6.3 @@ -0,0 +1,39 @@
     6.4 +/*
     6.5 + * Copyright (c) 2006-2007, XenSource Inc.
     6.6 + *
     6.7 + * This library is free software; you can redistribute it and/or
     6.8 + * modify it under the terms of the GNU Lesser General Public
     6.9 + * License as published by the Free Software Foundation; either
    6.10 + * version 2.1 of the License, or (at your option) any later version.
    6.11 + *
    6.12 + * This library is distributed in the hope that it will be useful,
    6.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    6.15 + * Lesser General Public License for more details.
    6.16 + *
    6.17 + * You should have received a copy of the GNU Lesser General Public
    6.18 + * License along with this library; if not, write to the Free Software
    6.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
    6.20 + */
    6.21 +
    6.22 +
    6.23 +#include "xen_common.h"
    6.24 +#include "xen_int_int_map.h"
    6.25 +#include "xen_internal.h"
    6.26 +
    6.27 +
    6.28 +xen_int_int_map *
    6.29 +xen_int_int_map_alloc(size_t size)
    6.30 +{
    6.31 +    xen_int_int_map *result = calloc(1, sizeof(xen_int_int_map) +
    6.32 +                                     size * sizeof(struct xen_int_int_map_contents));
    6.33 +    result->size = size;
    6.34 +    return result;
    6.35 +}
    6.36 +
    6.37 +
    6.38 +void
    6.39 +xen_int_int_map_free(xen_int_int_map *map)
    6.40 +{
    6.41 +    free(map);
    6.42 +}
     7.1 --- a/tools/libxen/src/xen_vm_metrics.c	Mon Apr 09 12:20:35 2007 +0100
     7.2 +++ b/tools/libxen/src/xen_vm_metrics.c	Mon Apr 09 17:09:21 2007 +0100
     7.3 @@ -22,7 +22,9 @@
     7.4  
     7.5  #include "xen_common.h"
     7.6  #include "xen_int_float_map.h"
     7.7 +#include "xen_int_int_map.h"
     7.8  #include "xen_internal.h"
     7.9 +#include "xen_string_string_map.h"
    7.10  #include "xen_vm_metrics.h"
    7.11  
    7.12  
    7.13 @@ -49,6 +51,15 @@ static const struct_member xen_vm_metric
    7.14          { .key = "VCPUs_utilisation",
    7.15            .type = &abstract_type_int_float_map,
    7.16            .offset = offsetof(xen_vm_metrics_record, vcpus_utilisation) },
    7.17 +        { .key = "VCPUs_CPU",
    7.18 +          .type = &abstract_type_int_int_map,
    7.19 +          .offset = offsetof(xen_vm_metrics_record, vcpus_cpu) },
    7.20 +        { .key = "VCPUs_params",
    7.21 +          .type = &abstract_type_string_string_map,
    7.22 +          .offset = offsetof(xen_vm_metrics_record, vcpus_params) },
    7.23 +        { .key = "start_time",
    7.24 +          .type = &abstract_type_datetime,
    7.25 +          .offset = offsetof(xen_vm_metrics_record, start_time) },
    7.26          { .key = "last_updated",
    7.27            .type = &abstract_type_datetime,
    7.28            .offset = offsetof(xen_vm_metrics_record, last_updated) }
    7.29 @@ -74,6 +85,8 @@ xen_vm_metrics_record_free(xen_vm_metric
    7.30      free(record->handle);
    7.31      free(record->uuid);
    7.32      xen_int_float_map_free(record->vcpus_utilisation);
    7.33 +    xen_int_int_map_free(record->vcpus_cpu);
    7.34 +    xen_string_string_map_free(record->vcpus_params);
    7.35      free(record);
    7.36  }
    7.37  
    7.38 @@ -168,6 +181,56 @@ xen_vm_metrics_get_vcpus_utilisation(xen
    7.39  
    7.40  
    7.41  bool
    7.42 +xen_vm_metrics_get_vcpus_cpu(xen_session *session, xen_int_int_map **result, xen_vm_metrics vm_metrics)
    7.43 +{
    7.44 +    abstract_value param_values[] =
    7.45 +        {
    7.46 +            { .type = &abstract_type_string,
    7.47 +              .u.string_val = vm_metrics }
    7.48 +        };
    7.49 +
    7.50 +    abstract_type result_type = abstract_type_int_int_map;
    7.51 +
    7.52 +    *result = NULL;
    7.53 +    XEN_CALL_("VM_metrics.get_VCPUs_CPU");
    7.54 +    return session->ok;
    7.55 +}
    7.56 +
    7.57 +
    7.58 +bool
    7.59 +xen_vm_metrics_get_vcpus_params(xen_session *session, xen_string_string_map **result, xen_vm_metrics vm_metrics)
    7.60 +{
    7.61 +    abstract_value param_values[] =
    7.62 +        {
    7.63 +            { .type = &abstract_type_string,
    7.64 +              .u.string_val = vm_metrics }
    7.65 +        };
    7.66 +
    7.67 +    abstract_type result_type = abstract_type_string_string_map;
    7.68 +
    7.69 +    *result = NULL;
    7.70 +    XEN_CALL_("VM_metrics.get_VCPUs_params");
    7.71 +    return session->ok;
    7.72 +}
    7.73 +
    7.74 +
    7.75 +bool
    7.76 +xen_vm_metrics_get_start_time(xen_session *session, time_t *result, xen_vm_metrics vm_metrics)
    7.77 +{
    7.78 +    abstract_value param_values[] =
    7.79 +        {
    7.80 +            { .type = &abstract_type_string,
    7.81 +              .u.string_val = vm_metrics }
    7.82 +        };
    7.83 +
    7.84 +    abstract_type result_type = abstract_type_datetime;
    7.85 +
    7.86 +    XEN_CALL_("VM_metrics.get_start_time");
    7.87 +    return session->ok;
    7.88 +}
    7.89 +
    7.90 +
    7.91 +bool
    7.92  xen_vm_metrics_get_last_updated(xen_session *session, time_t *result, xen_vm_metrics vm_metrics)
    7.93  {
    7.94      abstract_value param_values[] =
     8.1 --- a/tools/libxen/test/test_bindings.c	Mon Apr 09 12:20:35 2007 +0100
     8.2 +++ b/tools/libxen/test/test_bindings.c	Mon Apr 09 17:09:21 2007 +0100
     8.3 @@ -757,6 +757,10 @@ static void print_vm_metrics(xen_session
     8.4      my_strftime(time, 256, "Metrics updated at %c, local time.\n", tm);
     8.5      printf(time);
     8.6  
     8.7 +    tm = localtime(&vm_metrics_record->start_time);
     8.8 +    my_strftime(time, 256, "VM running since %c, local time.\n", tm);
     8.9 +    printf(time);
    8.10 +
    8.11      for (size_t i = 0; i < vm_metrics_record->vcpus_utilisation->size; i++)
    8.12      {
    8.13          printf("%"PRId64" -> %lf.\n",
    8.14 @@ -764,6 +768,22 @@ static void print_vm_metrics(xen_session
    8.15                 vm_metrics_record->vcpus_utilisation->contents[i].val);
    8.16      }
    8.17  
    8.18 +    printf("VCPU -> PCPU mapping:\n");
    8.19 +    for (size_t i = 0; i < vm_metrics_record->vcpus_cpu->size; i++)
    8.20 +    {
    8.21 +        printf("  %"PRId64" -> %"PRId64".\n",
    8.22 +               vm_metrics_record->vcpus_cpu->contents[i].key,
    8.23 +               vm_metrics_record->vcpus_cpu->contents[i].val);
    8.24 +    }
    8.25 +
    8.26 +    printf("Live scheduling parameters:\n");
    8.27 +    for (size_t i = 0; i < vm_metrics_record->vcpus_params->size; i++)
    8.28 +    {
    8.29 +        printf("  %s -> %s.\n",
    8.30 +               vm_metrics_record->vcpus_params->contents[i].key,
    8.31 +               vm_metrics_record->vcpus_params->contents[i].val);
    8.32 +    }
    8.33 +
    8.34      xen_vm_metrics_record_free(vm_metrics_record);
    8.35      xen_vm_metrics_free(vm_metrics);
    8.36  
     9.1 --- a/tools/python/xen/xend/XendAPI.py	Mon Apr 09 12:20:35 2007 +0100
     9.2 +++ b/tools/python/xen/xend/XendAPI.py	Mon Apr 09 17:09:21 2007 +0100
     9.3 @@ -87,7 +87,16 @@ def xen_api_todo():
     9.4  
     9.5  
     9.6  def now():
     9.7 -    return xmlrpclib.DateTime(time.strftime("%Y%m%dT%H:%M:%S", time.gmtime()))
     9.8 +    return datetime()
     9.9 +
    9.10 +
    9.11 +def datetime(when = None):
    9.12 +    """Marshall the given time as a Xen-API DateTime.
    9.13 +
    9.14 +    @param when The time in question, given as seconds since the epoch, UTC.
    9.15 +                May be None, in which case the current time is used.
    9.16 +    """
    9.17 +    return xmlrpclib.DateTime(time.gmtime(when))
    9.18  
    9.19  
    9.20  # ---------------------------------------------------
    10.1 --- a/tools/python/xen/xend/XendVMMetrics.py	Mon Apr 09 12:20:35 2007 +0100
    10.2 +++ b/tools/python/xen/xend/XendVMMetrics.py	Mon Apr 09 17:09:21 2007 +0100
    10.3 @@ -138,7 +138,9 @@ class XendVMMetrics:
    10.4              return {}
    10.5  
    10.6      def get_start_time(self):
    10.7 -        return self.xend_domain_instance.info.get("start_time", -1)
    10.8 +        import xen.xend.XendAPI as XendAPI
    10.9 +        return XendAPI.datetime(
   10.10 +            self.xend_domain_instance.info.get("start_time", 0))
   10.11      
   10.12      def get_last_updated(self):
   10.13          import xen.xend.XendAPI as XendAPI
    11.1 --- a/tools/python/xen/xm/main.py	Mon Apr 09 12:20:35 2007 +0100
    11.2 +++ b/tools/python/xen/xm/main.py	Mon Apr 09 17:09:21 2007 +0100
    11.3 @@ -731,6 +731,10 @@ def xm_restore(args):
    11.4          server.xend.domain.restore(savefile, paused)
    11.5  
    11.6  
    11.7 +def datetime_to_secs(v):
    11.8 +    return time.mktime(time.strptime(str(v) + 'UTC', '%Y%m%dT%H:%M:%S%Z'))
    11.9 +
   11.10 +
   11.11  def getDomains(domain_names, state, full = 0):
   11.12      if serverType == SERVER_XEN_API:
   11.13          doms_sxp = []
   11.14 @@ -756,7 +760,8 @@ def getDomains(domain_names, state, full
   11.15                              'vcpus':    dom_metrics['VCPUs_number'],
   11.16                              'state':    state_str,
   11.17                              'cpu_time': dom_metrics['VCPUs_utilisation'],
   11.18 -                            'start_time': dom_metrics['start_time']})
   11.19 +                            'start_time': datetime_to_secs(
   11.20 +                                              dom_metrics['start_time'])})
   11.21  
   11.22              doms_sxp.append(['domain'] + map2sxp(dom_rec))
   11.23              doms_dict.append(dom_rec)