我刚刚编写了这个简短的C++程序来估算每秒钟的实际时钟周期数.
#include <iostream>
#include <time.h>
using namespace std;
int main () {
for(int i = 0; i < 10 ; i++) {
int first_clock = clock();
int first_time = time(NULL);
while(time(NULL) <= first_time) {}
int second_time = time(NULL);
int second_clock = clock();
cout << "Actual clocks per second = " << (second_clock - first_clock)/(second_time - first_time) << "\n";
cout << "CLOCKS_PER_SEC = " << CLOCKS_PER_SEC << "\n";
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
当我运行程序时,我得到的输出看起来像这样.
Actual clocks per second = 199139
CLOCKS_PER_SEC = …Run Code Online (Sandbox Code Playgroud) 可以为Tableau编写插件吗?Tableau是否配备了任何通用脚本语言?
例如,用于生成无法使用默认Tableau工具创建的可视化,或者使用各种指标等对数据集进行k均值聚类...