Git Product home page Git Product logo

Comments (4)

ciaranevans avatar ciaranevans commented on June 20, 2024

cc @CharlieMoon37 @Lawouach

This isn't blocking, but we just don't get the final event currently.

from chaostoolkit-reliably.

ciaranevans avatar ciaranevans commented on June 20, 2024

Just played with zipping & encoding my very small journal:

import zlib
import base64

exp = '{"chaoslib-version": "1.22.1", "platform": "macOS-11.5.1-x86_64-i386-64bit", "node": "Ciarans-Reliably-Mac.local", "experiment": {"title": "A Healthy Service", "description": "Sends Reliably `Good` Indicators to mimic a healthy service", "method": [{"type": "action", "name": "send_good_indicator", "provider": {"type": "python", "module": "reliability_utils", "func": "send_good_indicator", "arguments": {}}}], "secrets": {"reliably": {"token": {"type": "env", "key": "RELIABLY_TOKEN"}, "org": {"type": "env", "key": "RELIABLY_ORG"}, "host": {"type": "env", "key": "RELIABLY_HOST"}}, "other-stuff": {"hey": "hi"}}, "controls": [{"name": "chaosreliably", "provider": {"type": "python", "module": "chaosreliably.controls.experiment", "arguments": {"commit_hash": "59f9f577e2d90719098f4d23d26329ce41f2d0bd", "source": "https://github.com/chaostoolkit-incubator/chaostoolkit-reliably/exp.json", "user": "Ciaran Evans", "experiment_related_to_labels": [{"name": "99.9% of our requests are in the 2xx class", "service": "exploring-reliability-guide-service"}]}}}], "dry": null}, "start": "2021-10-07T14:20:26.111981", "status": "completed", "deviated": false, "steady_states": {"before": null, "after": null, "during": []}, "run": [{"activity": {"type": "action", "name": "send_good_indicator", "provider": {"type": "python", "module": "reliability_utils", "func": "send_good_indicator", "arguments": {}}}, "output": null, "status": "succeeded", "start": "2021-10-07T14:20:26.508300", "end": "2021-10-07T14:20:26.578684", "duration": 0.070384}], "rollbacks": [], "end": "2021-10-07T14:20:26.824180", "duration": 0.7352771759033203}'
exp_stripped = exp.replace(" ", "")

comp = zlib.compress(exp.encode())
b64bytes = base64.b64encode(comp)
b64string = b64bytes.decode()
compstripped = zlib.compress(exp_stripped.encode())
b64bytesstripped = base64.b64encode(compstripped)
b64stringstripped = b64bytesstripped.decode()

print(f"Experiment String bytes: {len(exp.encode('utf-8'))}")
print(f"Experiment String Stripped bytes: {len(exp_stripped.encode('utf-8'))}")
print(f"Experiment Zipped and B64'd bytes: {len(b64string.encode('utf-8'))}")
print(f"Experiment Stripped Zipped and B64'd bytes: {len(b64stringstripped.encode('utf-8'))}")
Experiment String bytes: 1626
Experiment String Stripped bytes: 1497
Experiment Zipped and B64'd bytes: 968
Experiment Stripped Zipped and B64'd bytes: 936

So even on small journals, we're not gonna be able to squeeze much more out of sending the whole thing over..

from chaostoolkit-reliably.

Lawouach avatar Lawouach commented on June 20, 2024

I think I'd go for sending this to large storage. This could actually be done by the CTK extension rather than on Reliably side.

from chaostoolkit-reliably.

Lawouach avatar Lawouach commented on June 20, 2024

We store the content into the payload and we manage it accordinly internally.

from chaostoolkit-reliably.

Related Issues (3)

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.