mirror of https://github.com/yandex/odyssey.git
machinarium: update csw benchmark
This commit is contained in:
parent
6b536d8647
commit
94b0ce6b30
|
@ -29,7 +29,7 @@ static void
|
||||||
benchmark_runner(void *arg)
|
benchmark_runner(void *arg)
|
||||||
{
|
{
|
||||||
printf("benchmark started.\n");
|
printf("benchmark started.\n");
|
||||||
machine_create_fiber(benchmark_worker, NULL);
|
machine_fiber_create(benchmark_worker, NULL);
|
||||||
machine_sleep(1000);
|
machine_sleep(1000);
|
||||||
printf("done.\n");
|
printf("done.\n");
|
||||||
printf("context switches %d in 1 sec.\n", csw);
|
printf("context switches %d in 1 sec.\n", csw);
|
||||||
|
@ -41,7 +41,7 @@ main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
machinarium_init();
|
machinarium_init();
|
||||||
int id = machine_create("benchmark", benchmark_runner, NULL);
|
int id = machine_create("benchmark", benchmark_runner, NULL);
|
||||||
machine_join(id);
|
machine_wait(id);
|
||||||
machinarium_free();
|
machinarium_free();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue