update test_sgraph
This commit is contained in:
parent
5785c5888e
commit
4343bb8c98
|
|
@ -36,6 +36,8 @@
|
|||
#define TARGET test_sgraph
|
||||
#define LOCAL_LIBS \
|
||||
sgraph mathutil graph putil
|
||||
#define OTHER_LIBS \
|
||||
pystub
|
||||
|
||||
#define SOURCES \
|
||||
test_sgraph.cxx
|
||||
|
|
|
|||
|
|
@ -16,12 +16,40 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "camera.h"
|
||||
#include "geomNode.h"
|
||||
|
||||
#include <notify.h>
|
||||
#include "pointerTo.h"
|
||||
#include "clockObject.h"
|
||||
#include "notify.h"
|
||||
|
||||
int main() {
|
||||
nout << "running test_sgraph" << endl;
|
||||
PT(Camera) cam = new Camera("camera");
|
||||
|
||||
ClockObject *c = ClockObject::get_global_clock();
|
||||
int i;
|
||||
int count = 100000;
|
||||
double start, finish;
|
||||
PT(Node) node;
|
||||
|
||||
node = new GeomNode("foo");
|
||||
start = c->get_real_time();
|
||||
for (i = 0; i < count; i++) {
|
||||
node->is_of_type(GeomNode::get_class_type());
|
||||
}
|
||||
finish = c->get_real_time();
|
||||
|
||||
cerr << "test 1: " << (finish - start) / (double)count * 1000.0
|
||||
<< " ms\n";
|
||||
|
||||
node = new NamedNode("foo");
|
||||
start = c->get_real_time();
|
||||
for (i = 0; i < count; i++) {
|
||||
node->is_of_type(GeomNode::get_class_type());
|
||||
}
|
||||
finish = c->get_real_time();
|
||||
|
||||
cerr << "test 2: " << (finish - start) / (double)count * 1000.0
|
||||
<< " ms\n";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue