성능 시험시 시간 계산

lapex의 이미지

DBMS 의 성능 시험을 해야 하는데
수행 시간을 계산하기 위해 가장 적합한 시간이
무엇인가여..

CPU time 을 계산하는 struct tms 가 가장 적합하다고

생각을 하는데

어떻게 생각하면 사용자의 시간을 계산하는 struct timeval 이
적합하다고 생각이 들기도 하고..

struct tms -> times(2)
struct timeval -> gettimeofday(2)

아니면 혹시 다른 것이 또 있나여?

choissi의 이미지

일전에 제가 찾아둔게 있습니다.
아래의 링크의 내용을 참고 하세요

http://www.ezdoum.com/stories.php?story=02/08/13/4705019

울랄라~ 호기심 천국~!!
http://www.ezdoum.com

purewell의 이미지

윗분이 쓰신 것도 있는데...

clock_t clkT1, clkT2;

clkT1=clock();
// 알고리즘 궁시렁궁시렁
clkT2=clock();

double rSec=((double)(clkT2-clkT1)/CLOCKS_PER_SEC);

ㅡ_-)=b 쓸만 합니다.

_____________________________
언제나 맑고픈 샘이가...
http://purewell.biz

lapex의 이미지

제가 질문을 잘못 올린 모양이군여.. ㅡ.ㅡ;;

제가 묻고자 하는 바는
DBMS 의 성능 시험을 할 때
system time, CPU time, user time ... 중에서
가장 일반적으로 쓰이는 시간이 무엇인가입니다.

new5244의 이미지

3개 다 쓰입니다....

from saibi

jj의 이미지

간단하게 bash에 있는 time이라는 명령어를 사용해 보면

[jjkim@cse ~] time ls
OCaml 76-85.pdf bin_for_admin/ memo pspdf tmp/
backup/ c@ netpbm-10.13.tgz public_html/ todo
bin/ caml3-1.pdf nml.vim sendmail/ work/

real 0m0.086s
user 0m0.000s
sys 0m0.010s

이런식으로 나오더군요, real, user, sys가 어떤의미를 가지고 있는지 알려주시면 좋겠습니다.

--
Life is short. damn short...

anna의 이미지

real 은 "ls" 라는 명령어를 실행시킨 실제 시간이고요..
user 는 user 모드에서 실행한 프로세스들의 cpu 시간 (clock 이라고 볼수도 있을 듯) 의 총합
system 은 kernel 모드에서 실행한 프로세스들의 cpu 시간의 총합이 아닌가

라는 생각이 듭니다.

아마 그래서 time ls -al 하면 좀 다르게 나올듯...

아자! 나도 한번 미쳐보자 아자!

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.