• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ perf_print_counter函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中perf_print_counter函数的典型用法代码示例。如果您正苦于以下问题:C++ perf_print_counter函数的具体用法?C++ perf_print_counter怎么用?C++ perf_print_counter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了perf_print_counter函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: test_perf

static int
test_perf(int argc, char *argv[])
{
	perf_counter_t	cc, ec;

	cc = perf_alloc(PC_COUNT, "test_count");
	ec = perf_alloc(PC_ELAPSED, "test_elapsed");

	if ((cc == NULL) || (ec == NULL)) {
		printf("perf: counter alloc failed\n");
		return 1;
	}

	perf_begin(ec);
	perf_count(cc);
	perf_count(cc);
	perf_count(cc);
	perf_count(cc);
	printf("perf: expect count of 4\n");
	perf_print_counter(cc);
	perf_end(ec);
	printf("perf: expect count of 1\n");
	perf_print_counter(ec);
	printf("perf: expect at least two counters\n");
	perf_print_all(0);

	perf_free(cc);
	perf_free(ec);

	return OK;
}
开发者ID:ericweiye,项目名称:Firmware,代码行数:31,代码来源:tests_main.c


示例2: perf_print_counter

void
CM8JL65::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	_reports->print_info("report queue");
}
开发者ID:AlexisTM,项目名称:Firmware,代码行数:7,代码来源:cm8jl65.cpp


示例3: printf

void
FXOS8700CQ::print_info()
{
	printf("accel reads:          %u\n", _accel_read);
	printf("mag reads:            %u\n", _mag_read);
	perf_print_counter(_accel_sample_perf);
	perf_print_counter(_mag_sample_perf);
	perf_print_counter(_bad_registers);
	perf_print_counter(_bad_values);
	perf_print_counter(_accel_duplicates);
	_accel_reports->print_info("accel reports");
	_mag_reports->print_info("mag reports");
	::printf("checked_next: %u\n", _checked_next);

	for (uint8_t i = 0; i < FXOS8700C_NUM_CHECKED_REGISTERS; i++) {
		uint8_t v = read_reg(_checked_registers[i]);

		if (v != _checked_values[i]) {
			::printf("reg %02x:%02x should be %02x\n",
				 (unsigned)_checked_registers[i],
				 (unsigned)v,
				 (unsigned)_checked_values[i]);
		}
	}

	::printf("temperature: %.2f\n", (double)_last_temperature);
}
开发者ID:bo-rc,项目名称:Firmware,代码行数:27,代码来源:fxos8700cq.cpp


示例4: perf_print_counter

void
Gimbal::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	perf_print_counter(_buffer_overflows);
}
开发者ID:anton-matosov,项目名称:PX4Firmware,代码行数:7,代码来源:gimbal.cpp


示例5: switch

int
PX4IO_serial::ioctl(unsigned operation, unsigned &arg)
{

	switch (operation) {

	case 1:		/* XXX magic number - test operation */
		switch (arg) {
		case 0:
			lowsyslog("test 0\n");

			/* kill DMA, this is a PIO test */
			stm32_dmastop(_tx_dma);
			stm32_dmastop(_rx_dma);
			rCR3 &= ~(USART_CR3_DMAR | USART_CR3_DMAT);

			for (;;) {
				while (!(rSR & USART_SR_TXE))
					;
				rDR = 0x55;
			}
			return 0;

		case 1:
			{
				unsigned fails = 0;
				for (unsigned count = 0;; count++) {
					uint16_t value = count & 0xffff;

					if (write((PX4IO_PAGE_TEST << 8) | PX4IO_P_TEST_LED, &value, 1) != 0)
						fails++;
						
					if (count >= 5000) {
						lowsyslog("==== test 1 : %u failures ====\n", fails);
						perf_print_counter(_pc_txns);
						perf_print_counter(_pc_dmasetup);
						perf_print_counter(_pc_retries);
						perf_print_counter(_pc_timeouts);
						perf_print_counter(_pc_crcerrs);
						perf_print_counter(_pc_dmaerrs);
						perf_print_counter(_pc_protoerrs);
						perf_print_counter(_pc_uerrs);
						perf_print_counter(_pc_idle);
						perf_print_counter(_pc_badidle);
						count = 0;
					}
				}
				return 0;
			}
		case 2:
			lowsyslog("test 2\n");
			return 0;
		}
	default:
		break;
	}

	return -1;
}
开发者ID:SkyHawkDP,项目名称:PX4Firmware,代码行数:59,代码来源:px4io_serial.cpp


示例6: perf_print_counter

void
Airspeed::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	warnx("poll interval:  %u ticks", _measure_ticks);
	_reports->print_info("report queue");
}
开发者ID:ChristophTobler,项目名称:Firmware,代码行数:8,代码来源:airspeed.cpp


示例7: perf_print_counter

void
SF1XX::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	printf("poll interval:  %u ticks\n", _measure_ticks);
	_reports->print_info("report queue");
}
开发者ID:syantek,项目名称:Firmware,代码行数:8,代码来源:sf1xx.cpp


示例8: perf_print_counter

void LidarLitePWM::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_read_errors);
	perf_print_counter(_sensor_zero_resets);
	warnx("poll interval:  %u ticks", getMeasureTicks());
	warnx("distance: %.3fm", (double)_range.current_distance);
}
开发者ID:Aerovinci,项目名称:Firmware,代码行数:8,代码来源:LidarLitePWM.cpp


示例9: perf_print_counter

void
AirspeedSim::print_info()
{
    perf_print_counter(_sample_perf);
    perf_print_counter(_comms_errors);
    perf_print_counter(_buffer_overflows);
    PX4_INFO("poll interval:  %u ticks", _measure_ticks);
    _reports->print_info("report queue");
}
开发者ID:JW-CHOI,项目名称:Firmware,代码行数:9,代码来源:airspeedsim.cpp


示例10: printf

void
L3GD20::print_info()
{
	printf("gyro reads:          %u\n", _read);
	perf_print_counter(_sample_perf);
	perf_print_counter(_reschedules);
	perf_print_counter(_errors);
	_reports->print_info("report queue");
}
开发者ID:363546178,项目名称:PX4_STM32F4DISCOVERY,代码行数:9,代码来源:l3gd20.cpp


示例11: perf_print_counter

void
QMC5883::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	printf("poll interval:  %u ticks\n", _measure_ticks);
	print_message(_last_report);
	_reports->print_info("report queue");
}
开发者ID:AlexisTM,项目名称:Firmware,代码行数:9,代码来源:qmc5883.cpp


示例12: perf_print_counter

void
LIS3MDL::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	PX4_INFO("poll interval:  %u ticks", _measure_ticks);
	print_message(_last_report);
	_reports->print_info("report queue");
}
开发者ID:LiYuanxing,项目名称:Firmware,代码行数:9,代码来源:lis3mdl.cpp


示例13: perf_print_counter

void
HMC5883::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	perf_print_counter(_buffer_overflows);
	printf("poll interval:  %u ticks\n", _measure_ticks);
	_reports->print_info("report queue");
}
开发者ID:akistanov,项目名称:Firmware,代码行数:9,代码来源:hmc5883.cpp


示例14: printf

void
TFMINI::print_info()
{
	printf("Using port '%s'\n", _port);
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	printf("poll interval:  %d ticks\n", _measure_ticks);
	_reports->print_info("report queue");
}
开发者ID:ayu135,项目名称:Firmware,代码行数:9,代码来源:tfmini.cpp


示例15: perf_print_counter

void
LM73::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	perf_print_counter(_buffer_overflows);
	printf("poll interval:  %u ticks\n", _measure_ticks);
	_reports->print_info("report queue");
	printf("ambient temperature:   %10.4f\n", (double)(temperature));
}
开发者ID:AdyashaDash,项目名称:fw_px4_sysidCL,代码行数:10,代码来源:lm73.cpp


示例16: perf_print_counter

void
ETSAirspeed::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	perf_print_counter(_buffer_overflows);
	printf("poll interval:  %u ticks\n", _measure_ticks);
	printf("report queue:   %u (%u/%u @ %p)\n",
	       _num_reports, _oldest_report, _next_report, _reports);
}
开发者ID:omija1,项目名称:PX4Firmware,代码行数:10,代码来源:ets_airspeed.cpp


示例17: perf_print_counter

void
LSM303D::print_info()
{
    perf_print_counter(_accel_sample_perf);
    printf("report queue:   %u (%u/%u @ %p)\n",
           _num_accel_reports, _oldest_accel_report, _next_accel_report, _accel_reports);
    perf_print_counter(_mag_sample_perf);
    printf("report queue:   %u (%u/%u @ %p)\n",
           _num_mag_reports, _oldest_mag_report, _next_mag_report, _mag_reports);
}
开发者ID:trungkiena6,项目名称:mavstation-daughterboard,代码行数:10,代码来源:lsm303d.cpp


示例18: perf_print_counter

void LidarLiteI2C::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	perf_print_counter(_sensor_resets);
	perf_print_counter(_sensor_zero_resets);
	printf("poll interval:  %u ticks\n", getMeasureTicks());
	_reports->print_info("report queue");
	printf("distance: %ucm (0x%04x)\n",
	       (unsigned)_last_distance, (unsigned)_last_distance);
}
开发者ID:imcnanie,项目名称:Firmware,代码行数:11,代码来源:LidarLiteI2C.cpp


示例19: perf_print_counter

void
AK8975::print_info()
{
	perf_print_counter(_sample_perf);
	perf_print_counter(_comms_errors);
	perf_print_counter(_buffer_overflows);
	printf("poll interval:  %u ticks\n", _measure_ticks);
	_reports->print_info("report queue");
	printf("sensitivity ASAX %02X\n", _fuse[0]);
	printf("sensitivity ASAY %02X\n", _fuse[1]);
	printf("sensitivity ASAZ %02X\n", _fuse[2]);
}
开发者ID:smithandrewc,项目名称:Firmware,代码行数:12,代码来源:ak8975.cpp


示例20: perf_print_counter

void
LL40LS::print_info()
{
    perf_print_counter(_sample_perf);
    perf_print_counter(_comms_errors);
    perf_print_counter(_buffer_overflows);
    perf_print_counter(_sensor_resets);
    perf_print_counter(_sensor_zero_resets);
    printf("poll interval:  %u ticks\n", _measure_ticks);
    _reports->print_info("report queue");
    printf("distance: %ucm (0x%04x)\n",
           (unsigned)_last_distance, (unsigned)_last_distance);
}
开发者ID:kevin03,项目名称:Firmware,代码行数:13,代码来源:ll40ls.cpp



注:本文中的perf_print_counter函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ perform函数代码示例发布时间:2022-05-30
下一篇:
C++ perf_pop函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap