Git Product home page Git Product logo

Comments (5)

grtcdr avatar grtcdr commented on May 28, 2024 3

I think CSV should work fine, easily parsable by toipe and is also available to the user for viewing (outside of the program).

from toipe.

PriceHiller avatar PriceHiller commented on May 28, 2024 2

I'd be willing to take a crack at this. I just want to know if serialization is something that is open for discussion, or if manual parsing of the values into CSV is preferred.

  1. Use Serde and then something like a csv parser that can be used with Serde
  2. Make another function under display_results named save_csv and then do the manual conversion in that function.

I'm leaning towards using Serde just because it opens up future expansion for graphing etc. without much, if any, rewriting as most libraries support Serde pretty well. Only issue I know Serde will have is that the started_at and ended_at fields in ToipeResults will have to go because Serde can't serialize std::time::Instant without more external libraries or our own serialization/deserialization implementation. Could just be moved into a single duration: std::time::Duration field and then calculate the Duration before creating the struct.

I'm interested in any thoughts regarding this.

from toipe.

abaksy avatar abaksy commented on May 28, 2024

Hi,
What results specifically would you like to store?
The most obvious and easily available metrics are the accuracy and wpm as they're already part of the ToipeResults structure

from toipe.

Samyak2 avatar Samyak2 commented on May 28, 2024

@abaksy perhaps it would be good to store the whole of ToipeResults. Any required metric can then be derived from that.

from toipe.

Samyak2 avatar Samyak2 commented on May 28, 2024

@treatybreaker thank you for taking a crack at this. I prefer the serde solution. I'm assuming that each ToipeResults will be serialized individually and appended to the CSV.

Could just be moved into a single duration: std::time::Duration field and then calculate the Duration before creating the struct.

This is reasonable. Although, along with the duration I would also like to store the start timestamp of the test. Perhaps chrono::DateTime.

from toipe.

Related Issues (20)

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.