Simulated product dispenser
Fork of mbed-cloud-workshop-connect-HTS221 by
esfs_performance.h
00001 /* 00002 * Copyright (c) 2016 ARM Limited. All rights reserved. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * Licensed under the Apache License, Version 2.0 (the License); you may 00005 * not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef ESFS_SOURCE_INCLUDE_ESFS_PERFORMANCE_H_ 00018 #define ESFS_SOURCE_INCLUDE_ESFS_PERFORMANCE_H_ 00019 00020 #include <stdint.h> 00021 00022 //#define ESFS_PERFOMANCE_TEST // Allow enabling and disabling calls to performance. Define it on compilation 00023 00024 #define TITLE_MAX 30 00025 #define PERFORMANCE_ARRAY_SIZE 100 00026 typedef enum esfs_performance_type 00027 { 00028 ESFS_PERFORMANCE_START, 00029 ESFS_PERFORMANCE_END 00030 }esfs_performance_type_e; 00031 00032 typedef struct performance_record 00033 { 00034 char title[TITLE_MAX+1]; 00035 unsigned long mark; 00036 unsigned long total; 00037 esfs_performance_type_e type; 00038 }performance_record_t; 00039 00040 00041 #ifdef ESFS_PERFOMANCE_TEST // If not defined ESFS_PERFOMANCE_TEST functions will be removed 00042 00043 void print_performance(); 00044 void add_performance_mark(const char * title, esfs_performance_type_e type); 00045 00046 00047 00048 #else 00049 00050 #define print_performance() 00051 #define add_performance_mark(title, type) 00052 00053 #endif 00054 00055 #endif /* ESFS_SOURCE_INCLUDE_ESFS_PERFORMANCE_H_ */ 00056
Generated on Tue Jul 12 2022 19:12:12 by 1.7.2