Giter VIP home page Giter VIP logo

gotop's People

Contributors

calofmijuck avatar sunghun7511 avatar zych1751 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gotop's Issues

`core/process.go` 파일의 쀑볡을 ν•΄κ²°ν•΄μ£Όμ„Έμš”.

문제점

core/process.go 파일의 GetCPUUsage ν•¨μˆ˜μ™€ GetMemUsage ν•¨μˆ˜μ˜ λ‚΄μš©μ΄ λŒ€λΆ€λΆ„ κ²ΉμΉ˜λŠ” 것 κ°™μ•„μš”.

ν•΄κ²° 방법

νŒŒμ‹±ν•  파일 이름, indexλ₯Ό μ œμ™Έν•˜λ©΄ λ‚΄μš©μ΄ μ€‘λ³΅λ˜λ‹ˆ 이 두 값을 인자둜 λ°›λŠ” Private ν•¨μˆ˜λ₯Ό λ§Œλ“€λ©΄ 될 것 κ°™μ•„μš”!

process widgetμ—μ„œ 처음 1ν”„λ ˆμž„ λ™μ•ˆ cpu 값이 이상함.

ν˜„μž¬ cpu 총 μ‚¬μš©λŸ‰ - 이전 cpu 총 μ‚¬μš©λŸ‰ 을 μ΄μš©ν•˜μ—¬ κ³„μ‚°ν•˜λŠ”λ°, 처음 μΌœμ§€λŠ” κ²½μš°μ—λŠ” 이전 cpu 총 μ‚¬μš©λŸ‰μ΄ 0μ΄μ—¬μ„œ μ•„μ£Ό 큰 값이 λ‚˜μ˜€κ²Œλ¨.
μ²˜μŒμ—λŠ” max(percent, 100) κ³Ό 같은 방식도 μƒκ°ν–ˆλŠ”λ°, λŒ€λΆ€λΆ„μ˜ ν”„λ‘œμ„ΈμŠ€λ“€μ΄ 100으둜 λ‚˜μ™€μ„œ μ—¬μ „νžˆ μ΄μƒν•œκ²ƒ κ°™μ•„μ„œ λ‹€λ₯Έ ν•΄κ²° 방식이 ν•„μš”ν•΄ λ³΄μž„

크기가 쀑간에 λ³€κ²½ λμ„λ•Œ, μ΄μƒν•˜κ²Œ 그렀짐

각 widgetμ—μ„œ 처음 terminal 크기 κΈ°μ€€μœΌλ‘œ 데이터λ₯Ό μ €μž₯ν•˜κ³  μžˆμ–΄μ„œ 생긴 μ΄μŠˆμž…λ‹ˆλ‹€. resize μ΄λ²€νŠΈκ°€ λ°œμƒ ν–ˆμ„ λ•Œ, μ‘°μΉ˜κ°€ ν•„μš”ν•΄ λ³΄μž…λ‹ˆλ‹€.

μΆ”κ°€μ μœΌλ‘œ, κ°€λŠ₯ν•˜λ‹€λ©΄ 크기λ₯Ό mainμ—μ„œ 각 μœ„μ ―μœΌλ‘œ λ„˜κ²¨μ£Όλ˜κ°€ ν•΄μ„œ widget의 μœ„μΉ˜λ‚˜ 크기 상관없이 그렀질 수 있으면 쒋을 것 κ°™μ•„μš”. μ§€κΈˆμ€ [cpuWidget width] == [terminal width] && [memoryWidget width] == [terminal width] / 2 λ₯Ό κ°€μ •ν•˜κ³  μžˆλŠ”λ°, 이게 μœ„μΉ˜κ°€ λ°”λ€Œμ–΄μ„œ widget width와 terminal width의 λΉ„μœ¨μ΄ 달라지더라도 잘 μž‘λ™ν•  수 μžˆλ„λ‘ ν•˜λ©΄ 쒋을 것 κ°™μ•„μš”.

CI 연동을 ν•΄μ£Όμ„Έμš”.

λ¦°νŠΈμ™€ λΉŒλ“œκ°€ λ˜λŠ”μ§€ 체크λ₯Ό ν•˜κ³ , ν…ŒμŠ€νŠΈλŠ” ꡳ이 μ˜λ―Έκ°€ μ—†μ–΄μ„œ μ•ˆν•΄λ„ 될 것 κ°™μ•„μš”.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.