11 Commits

Author SHA1 Message Date
Julio López
9aadd9114c fix(cli): avoid memory bloat in benchmark encryption command (#4213)
Avoid memory bloat in `benchmark encryption` and `benchmark crypto` commands

Reuse the output buffer by resetting it between iterations.

Fixes #4210
2024-10-30 09:18:12 -07:00
Julio López
d37de8316e refactor(general): generalize units package (#4075)
Generalize a couple of functions in the units package using generics.
This allows removing duplicate code and simplifying callers by removing unnecessary integer conversions.

Additional cleanups:

- make "/s" part of the Printf format string ;
- simplify setSizeMBParameter;
- generalize cli.maybeHumanReadable*` helpers;
- remove unneeded receiver in commandRepositorySetParameters helpers.
2024-08-26 17:26:32 -07:00
Jarek Kowalski
fcb8197f3f chore(ci): upgraded linter to 1.59.0 (#3883) 2024-05-29 20:31:57 -07:00
Jarek Kowalski
09415e0c7d chore(ci): upgraded to go 1.22 (#3746)
Upgrades go to 1.22 and switches to new-style for loops

---------

Co-authored-by: Julio López <1953782+julio-lopez@users.noreply.github.com>
2024-04-08 09:52:47 -07:00
Jarek Kowalski
fe7a418a5b feat(cli): added decompression benchmark (#3773)
* feat(cli): added decompression benchmark

* Update cli/command_benchmark_compression.go

Co-authored-by: Julio López <1953782+julio-lopez@users.noreply.github.com>

* fixed log output

* deduped code

---------

Co-authored-by: Julio López <1953782+julio-lopez@users.noreply.github.com>
2024-04-04 18:47:11 -07:00
Jarek Kowalski
0554e2f7ce refactor(general): introduced generics to reduce boilerplate code (#2527)
This removes tons of boilerplate code around:

- retry loop
- connection management
- storage registration

* used generics in runInParallel
* introduced generics in freepool
* introduced strong typing for workshare.Pool and workshare.AsyncGroup
* fixed linter error on openbsd
2022-10-29 01:56:51 +00:00
atom
c5efed01f4 feat(cli): Support displaying storage values in base-2 [#2492] (#2502)
* Update display on repository summary

* Apply throughout app

* Situate units_test

* Update Command Line documentation

* Envar cleanup

* Rename to BytesString

* Restore envar string available for test

* Remove extraneous empty check and restore UIPreferences field for frontend

* PR: config bool cleanup and missed `BaseEnv`s

* Fix lint and test
2022-10-24 19:00:36 -07:00
Jarek Kowalski
51dcaa985d chore(ci): upgraded linter to 1.48.0 (#2294)
Mechanically fixed all issues, added `lint-fix` make target.
2022-08-09 06:07:54 +00:00
Jarek Kowalski
6160ee5668 refactor(repository): moved format blob management to separate package (#2245)
* refactor(repository): moved format blob management to separate package

This is completely mechanical, no behavior changes, only:

- moved types and functions to a new package
- adjusted visibility where needed
- added missing godoc
- renamed some identifiers to align with current usage
- mechanically converted some top-level functions into member functions
- fixed some mis-named variables

* refactor(repository): moved content.FormatingOptions to format.ContentFormat
2022-07-30 14:13:52 -07:00
Jarek Kowalski
30456d13e7 refactor(repository): refactored Crypter to an unexported interface (#2251) 2022-07-30 14:57:56 +00:00
Jarek Kowalski
d7e10dba59 feat(cli): improved kopia benchmark commands (#1849)
* added --parallel flag
* added `kopia benchmark encryption`
* added `kopia benchmark hashing`
2022-03-26 14:28:08 +00:00