libadc-cxx 1.0.0
Structured logging for scientific computing
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Functions | Variables
builder.hpp File Reference
#include <string>
#include <iostream>
#include <sstream>
#include <map>
#include <memory>
#include "adc/types.hpp"
#include <sys/time.h>
Include dependency graph for builder.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  adc::builder_api
 The builder api is used to construct structured log (json) messages that follow naming conventions. More...
 

Namespaces

namespace  adc
 

Macros

#define ADC_HS_
 bit values to control content of the host section.
 
#define ADC_HS_BASE   0x0
 ADC_HS_BASE collects just the hostname via gethostname()
 
#define ADC_HS_OS   0x1
 ADC_HS_OS collects other items from uname().
 
#define ADC_HS_RAMSIZE   0x2
 ADC_HS_RAMSIZE collects MemTotal.
 
#define ADC_HS_ENV   0x4
 ADC_HS_ENV collects env vars listed in env("ADC_HOST_SECTION_ENV") which is :-separated. Example: ADC_HOST_SECTION_ENV="SNLCLUSTER:SNLNETWORK:SNLSITE:SNLSYSTEM:SNLOS".
 
#define ADC_HS_CPU   0x10
 ADC_HS_CPU collects details from lscpu -J (requires lscpu installed)
 
#define ADC_HS_GPU   0x20
 ADC_HS_GPU collects gpu data available from lspci (requires lspci installed)
 
#define ADC_HS_NUMA   0x40
 ADC_HS_NUMA collects numa node, cpu, and per node memory from numactl -H (requires numactl installed)
 
#define ADC_HS_ALL   (ADC_HS_OS|ADC_HS_RAMSIZE|ADC_HS_ENV|ADC_HS_CPU|ADC_HS_GPU|ADC_HS_NUMA)
 all ADC_HS_* optional data included
 
#define ADC_MPI_
 bit values to control output of the add_mpi function
 
#define ADC_MPI_NONE   0x0
 include no mpi fields
 
#define ADC_MPI_RANK   0x1
 include "mpi_rank" field from mpi_comm_rank
 
#define ADC_MPI_SIZE   0x2
 include "mpi_size" field from mpi_comm_size
 
#define ADC_MPI_NAME   0x4
 include "mpi_name" field from mpi_comm_name
 
#define ADC_MPI_HOSTLIST   0x10
 include "mpi_hostlist" subsection from the communicator
 
#define ADC_MPI_RANK_HOST   0x20
 include "mpi_rank_host" subsection from the communicator
 
#define ADC_MPI_VER   0x100
 include "mpi_version" field from MPI_VERSION.MPI_SUBVERSIUON
 
#define ADC_MPI_LIB_VER   0x200
 include mpi_get_library_version result.
 
#define ADC_MPI_ALL   (ADC_MPI_RANK|ADC_MPI_SIZE|ADC_MPI_NAME|ADC_MPI_HOSTLIST|ADC_MPI_RANK_HOST|ADC_MPI_VER|ADC_MPI_LIB_VER)
 include all mpi options. If this value is used, then the call to add_mpi must be collective.
 
#define ADC_MPI_LOCAL   (ADC_MPI_RANK|ADC_MPI_SIZE|ADC_MPI_NAME|ADC_MPI_VER|ADC_MPI_LIB_VER)
 include all mpi options that do not require collective work.
 

Typedefs

typedef int32_t adc::adc_hs_subsection_flags
 
typedef int32_t adc::adc_mpi_field_flags
 

Functions

std::string adc::format_timespec_8601 (struct timespec &ts)
 
std::string adc::format_timespec_utc_ns (struct timespec &ts)
 

Variables

version adc::builder_api_version ("1.0.0", {"none"})