Line data Source code
1 : //
2 : // Author: Vladimir Migashko <migashko@gmail.com>, (C) 2013-2018
3 : //
4 : // Copyright: See COPYING file that comes with this distribution
5 : //
6 :
7 : #pragma once
8 :
9 : #include "statistics_config.hpp"
10 : #include <wfc/json.hpp>
11 :
12 : namespace wfc{ namespace io{
13 :
14 :
15 : struct statistics_config_json
16 : {
17 0 : JSON_NAME(target)
18 0 : JSON_NAME(tracking_ms)
19 :
20 : typedef json::object<
21 : statistics_config,
22 : json::member_list<
23 : json::member<n_target, statistics_config, std::string, &statistics_config::target>,
24 : json::member<n_tracking_ms, statistics_config, time_t, &statistics_config::tracking_ms>
25 : >
26 : > type;
27 :
28 : typedef type::target target;
29 : typedef type::serializer serializer;
30 : typedef type::member_list member_list;
31 : };
32 :
33 : struct statistics_stat_json
34 : {
35 : JSON_NAME(time_name)
36 : JSON_NAME(read_name)
37 : JSON_NAME(write_name)
38 : JSON_NAME(track_name)
39 :
40 : typedef json::object<
41 : statistics_stat,
42 : json::member_list<
43 : json::member<n_track_name, statistics_stat, std::string, &statistics_stat::track_name>,
44 : json::member<n_time_name, statistics_stat, std::string, &statistics_stat::time_name>,
45 : json::member<n_read_name, statistics_stat, std::string, &statistics_stat::read_name>,
46 : json::member<n_write_name, statistics_stat, std::string, &statistics_stat::write_name>
47 : >
48 : > type;
49 :
50 : typedef type::target target;
51 : typedef type::serializer serializer;
52 : typedef type::member_list member_list;
53 : };
54 :
55 : }}
|